Skip to content

Commit 43ac911

Browse files
r0qsaxiccameel
committed
Sort pre-0.4.0 versions properly
Co-authored-by: Alex Beregszaszi <[email protected]> Co-authored-by: Kamil Śliwak <[email protected]>
1 parent 0665823 commit 43ac911

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

update.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ function buildVersion (build) {
118118
if (build.prerelease && build.prerelease.length > 0) {
119119
version += '-' + build.prerelease
120120
}
121+
// workaround for pre-0.4.0, where prereleases didn't bump the version
122+
// NOTE: the text must be lexically after 'nightly'
123+
if (semver.lt(build.version, '0.4.0')) {
124+
version += '-workaround'
125+
}
121126
if (build.build && build.build.length > 0) {
122127
version += '+' + build.build
123128
}

0 commit comments

Comments
 (0)