Skip to content

Commit

Permalink
Fix version check on next (woodpecker-ci#3340)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashass authored and langecode committed Feb 7, 2024
1 parent 4db6e65 commit 2cfe0f6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web/src/compositions/useVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
});
Expand Down

0 comments on commit 2cfe0f6

Please sign in to comment.