fix: make version update check more robust (#2437)

This commit is contained in:
ReenigneArcher 2024-04-18 15:35:49 -04:00 committed by GitHub
commit 69191cafe9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 33 additions and 5 deletions

View file

@ -112,10 +112,16 @@
stableBuildAvailable() {
// If we can't get versions, return false
if (!this.githubVersion || !this.version) return false;
// Get the GitHub version tag
let v = this.githubVersion.name;
let v_github = this.githubVersion.name;
// If the version starts with a v, remove it
if (v.indexOf("v") === 0) v = v.substring(1);
if (v_github.indexOf("v") === 0) v_github = v_github.substring(1);
// Get the current version
let v_this = this.version;
// If the version starts with a v, remove it
if (v_this.indexOf("v") === 0) v_this = v_this.substring(1);
// if nightly or dirty, we do an additional check to make sure it's an actual upgrade.
if (this.buildVersionIsNightly || this.buildVersionIsDirty) {
@ -124,7 +130,7 @@
}
// return true if the version is different, otherwise false
return v !== this.version;
return v_github !== v_this;
},
nightlyBuildAvailable() {
// Verify nightly data is available and the build version is not stable