Commit 3c75be2c by zhanghaozhe

限制打包

parent 6fa7cf28
......@@ -31,7 +31,7 @@ const printBuildError = require('react-dev-utils/printBuildError');
const childProcess = require('child_process')
const deploymentBranches = ['master', 'pre', 'dev'];
const version = childProcess.execSync('git name-rev --name-only HEAD', {'encoding': 'utf8'})
if(!deploymentBranches.includes(version)){
if(!deploymentBranches.includes(version.trim())){
console.log(chalk.yellow(`当前不在上线分支,请切换至上线分支(${deploymentBranches.join('/')})打包\n`))
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment