update to 1.0.10

This commit is contained in:
LouisLam
2021-08-04 13:59:42 +08:00
parent 8cd0e7a058
commit d315e8306b
3 changed files with 15 additions and 7 deletions

View File

@@ -52,11 +52,19 @@ if (! exists) {
function commit(version) {
let msg = "update to " + version;
child_process.spawnSync("git", ["commit", "-m", msg]);
let res = child_process.spawnSync("git", ["commit", "-m", msg, "-a"]);
let stdout = res.stdout.toString().trim();
console.log(stdout)
if (stdout.includes("no changes added to commit")) {
throw new Error("commit error")
}
}
function tag(version) {
child_process.spawnSync("git", ["tag", version]);
let res = child_process.spawnSync("git", ["tag", version]);
console.log(res.stdout.toString().trim())
}
function tagExists(version) {