auto publish

master
xiejianxiong 4 years ago
parent 108e232afa
commit 04d7a27d89

@ -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;

@ -1,6 +1,6 @@
{ {
"name": "zq_auto_publish", "name": "zq_auto_publish",
"version": "1.0.6", "version": "1.0.7",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"bin": { "bin": {

Loading…
Cancel
Save