mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #2047 from Tyriar/2044_cd_fix
Base the next beta version on the correct current beta
This commit is contained in:
+8
-1
@@ -44,7 +44,14 @@ function getNextBetaVersion() {
|
||||
if (publishedVersions.length === 0) {
|
||||
return `${packageJson.version}-${tag}1`;
|
||||
}
|
||||
const latestPublishedVersion = publishedVersions.sort((a, b) => b.localeCompare(a))[0];
|
||||
const latestPublishedVersion = publishedVersions.sort((a, b) => {
|
||||
if (b.length > a.length) {
|
||||
return true;
|
||||
} else if (b.length < a.length) {
|
||||
return false;
|
||||
}
|
||||
return b.localeCompare(a)
|
||||
})[0];
|
||||
const latestTagVersion = parseInt(latestPublishedVersion.substr(latestPublishedVersion.search(/[0-9]+$/)), 10);
|
||||
return `${nextStableVersion}-${tag}${latestTagVersion + 1}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user