mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
parent
5cedc956e9
commit
c746857830
1 changed files with 8 additions and 1 deletions
|
@ -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,
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue