|
|
|
@ -32,6 +32,10 @@ if (! exists) {
|
|
|
|
|
process.exit(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Commit updated files
|
|
|
|
|
* @param {string} version Version to update to
|
|
|
|
|
*/
|
|
|
|
|
function commit(version) {
|
|
|
|
|
let msg = "Update to " + version;
|
|
|
|
|
|
|
|
|
@ -47,6 +51,10 @@ function commit(version) {
|
|
|
|
|
console.log(res.stdout.toString().trim());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a tag with the specified version
|
|
|
|
|
* @param {string} version Tag to create
|
|
|
|
|
*/
|
|
|
|
|
function tag(version) {
|
|
|
|
|
let res = childProcess.spawnSync("git", [ "tag", version ]);
|
|
|
|
|
console.log(res.stdout.toString().trim());
|
|
|
|
@ -55,6 +63,11 @@ function tag(version) {
|
|
|
|
|
console.log(res.stdout.toString().trim());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Check if a tag exists for the specified version
|
|
|
|
|
* @param {string} version Version to check
|
|
|
|
|
* @returns {boolean} Does the tag already exist
|
|
|
|
|
*/
|
|
|
|
|
function tagExists(version) {
|
|
|
|
|
if (! version) {
|
|
|
|
|
throw new Error("invalid version");
|
|
|
|
|