Commit 8d7d45a4 by zhanghaozhe

Merge branch 'master' into pre

parents 020699fb da9642fc
...@@ -30,7 +30,7 @@ const FileSizeReporter = require('react-dev-utils/FileSizeReporter'); ...@@ -30,7 +30,7 @@ const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
const printBuildError = require('react-dev-utils/printBuildError'); const printBuildError = require('react-dev-utils/printBuildError');
const childProcess = require('child_process') const childProcess = require('child_process')
const deploymentBranches = ['master', 'pre', 'dev']; const deploymentBranches = ['master', 'pre', 'dev'];
const version = childProcess.execSync('git name-rev --name-only HEAD', {'encoding': 'utf8'}) const version = childProcess.execSync('git symbolic-ref --short -q HEAD', {'encoding': 'utf8'})
if(!deploymentBranches.includes(version.trim())){ if(!deploymentBranches.includes(version.trim())){
console.log(chalk.yellow(`当前不在上线分支,请切换至上线分支(${deploymentBranches.join('/')})打包\n`)) console.log(chalk.yellow(`当前不在上线分支,请切换至上线分支(${deploymentBranches.join('/')})打包\n`))
return 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