|
|
@ -15,9 +15,9 @@ if (fs.existsSync(versionPath)) { |
|
|
|
} |
|
|
|
|
|
|
|
// 根据版本信息是已存在commit,进行不同处理
|
|
|
|
if (versionStr.indexOf(commit) != -1) { |
|
|
|
console.warn('\x1B[33m%s\x1b[0m', 'warming: 当前的git版本数据已经存在了!\n') |
|
|
|
} else { |
|
|
|
// if (versionStr.indexOf(commit) != -1) {
|
|
|
|
// console.warn('\x1B[33m%s\x1b[0m', 'warming: 当前的git版本数据已经存在了!\n')
|
|
|
|
// } else {
|
|
|
|
let name = execSync('git show -s --format=%cn').toString().trim(); //姓名
|
|
|
|
let email = execSync('git show -s --format=%ce').toString().trim(); //邮箱
|
|
|
|
let date = new Date(execSync('git show -s --format=%cd').toString()); //日期
|
|
|
@ -28,7 +28,7 @@ if (versionStr.indexOf(commit) != -1) { |
|
|
|
execSync(`git commit ${versionPath} -m 自动提交版本信息`); |
|
|
|
execSync(`git push origin ${execSync('git rev-parse --abbrev-ref HEAD').toString().trim()}`); |
|
|
|
} |
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
// 将version文件移植到打包文件中
|
|
|
|
if (fs.existsSync(buildPath)) { |
|
|
|