1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-24 10:07:21 +02:00

Fix version check on next (#3340)

Closes #3318
This commit is contained in:
Lukas 2024-02-07 02:10:36 +01:00 committed by GitHub
parent 5cedc956e9
commit c746857830
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,11 +81,18 @@ export function useVersion() {
}
}
let needsUpdate = false;
if (usesNext) {
needsUpdate = latest !== current;
} else if (latest !== undefined && currentSemver !== null) {
needsUpdate = semverGt(latest, currentSemver);
}
version.value = {
latest,
current,
currentShort: usesNext ? 'next' : current,
needsUpdate: latest !== undefined && currentSemver !== null && semverGt(latest, currentSemver),
needsUpdate,
usesNext,
};
});