拒绝在CI环境使用不干净的工作区构建应用
This commit is contained in:
@@ -22,6 +22,8 @@ try {
|
||||
if (!execSync('git status --porcelain').toString().trim()) {
|
||||
gitInfo.commit_id = execSync('git log -1 --pretty=format:"%H"').toString().trim()
|
||||
gitInfo.commit_date = execSync('git log -1 --pretty=format:"%ad" --date=iso-strict').toString().trim()
|
||||
} else if (process.env.IS_CI) {
|
||||
throw new Error('Working directory is not clean')
|
||||
}
|
||||
} catch {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user