Base the beta build off of the next minor version

This commit is contained in:
Daniel Imms
2019-04-28 00:45:51 +00:00
parent 70db48b533
commit 65eaea39d3
2 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -32,13 +32,15 @@ function getNextVersion(tag) {
console.error('The package.json version must be of the form x.y.z');
process.exit(1);
}
const publishedVersions = getPublishedVersions(packageJson.version, tag);
const stableVersion = packageJson.version.split('.');
const nextStableVersion = `${stableVersion[0]}.${parseInt(stableVersion[1]) + 1}.${stableVersion[2]}`;
const publishedVersions = getPublishedVersions(nextStableVersion, tag);
if (publishedVersions.length === 0) {
return `${packageJson.version}-${tag}1`;
}
const latestPublishedVersion = publishedVersions.sort((a, b) => b.localeCompare(a))[0];
const latestTagVersion = parseInt(latestPublishedVersion.substr(latestPublishedVersion.search(/[0-9]+$/)), 10);
return `${packageJson.version}-${tag}${latestTagVersion + 1}`;
return `${nextStableVersion}-${tag}${latestTagVersion + 1}`;
}
function getPublishedVersions(version, tag) {
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "xterm",
"description": "Full xterm terminal, in your browser",
"version": "3.13.0",
"version": "3.12.0",
"main": "lib/public/Terminal.js",
"types": "typings/xterm.d.ts",
"repository": "https://github.com/xtermjs/xterm.js",
@@ -61,4 +61,4 @@
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"watch": "tsc -b -w ./src/tsconfig.all.json --preserveWatchOutput"
}
}
}