|
|
@ -6,24 +6,21 @@ const execa = require('execa');
|
|
|
|
// const { Config } = require('../utils/config');
|
|
|
|
// const { Config } = require('../utils/config');
|
|
|
|
const { Config } = require('/Users/config.js');
|
|
|
|
const { Config } = require('/Users/config.js');
|
|
|
|
|
|
|
|
|
|
|
|
const buildPath = Config.buildPath;
|
|
|
|
|
|
|
|
const codePath = Config.codePath;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
program.parse(process.argv);
|
|
|
|
program.parse(process.argv);
|
|
|
|
const env = program.args[0];
|
|
|
|
const env = program.args[0];
|
|
|
|
const codeBranchArg = program.args[1];
|
|
|
|
const codeBranchArg = program.args[1];
|
|
|
|
const buildBranchArg = program.args[2];
|
|
|
|
const buildBranchArg = program.args[2];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const buildPath = env === 'build' ? Config.buildPathJupyter : Config.buildPath;
|
|
|
|
|
|
|
|
const codePath = Config.codePath;
|
|
|
|
|
|
|
|
|
|
|
|
const mapping = {
|
|
|
|
const mapping = {
|
|
|
|
'test': { cmd: 'test-build', codeBranch: 'dev', buildBranch: 'dev_aliyun' },
|
|
|
|
'test': { cmd: 'test-build', codeBranch: 'dev', buildBranch: 'dev_aliyun' },
|
|
|
|
|
|
|
|
'build': { cmd: 'test-newbuild', codeBranch: 'dev', buildBranch: 'jupyter' },
|
|
|
|
'pre': { cmd: 'pre-build', codeBranch: 'dev', buildBranch: 'predevelop' },
|
|
|
|
'pre': { cmd: 'pre-build', codeBranch: 'dev', buildBranch: 'predevelop' },
|
|
|
|
'pro': { cmd: 'build', codeBranch: 'dev', buildBranch: 'develop' },
|
|
|
|
'pro': { cmd: 'build', codeBranch: 'dev', buildBranch: 'develop' },
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!mapping[env]) {
|
|
|
|
if (!mapping[env]) {
|
|
|
|
console.log(chalk.red(`not exist ${env} branch`));
|
|
|
|
console.log(chalk.red(`not exist ${env} branch`));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|