diff --git a/bin/auto-publish.js b/bin/auto-publish.js index c89a44f..181ae90 100644 --- a/bin/auto-publish.js +++ b/bin/auto-publish.js @@ -6,24 +6,21 @@ const execa = require('execa'); // const { Config } = require('../utils/config'); const { Config } = require('/Users/config.js'); -const buildPath = Config.buildPath; -const codePath = Config.codePath; - program.parse(process.argv); const env = program.args[0]; const codeBranchArg = program.args[1]; const buildBranchArg = program.args[2]; - - +const buildPath = env === 'build' ? Config.buildPathJupyter : Config.buildPath; +const codePath = Config.codePath; const mapping = { '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' }, 'pro': { cmd: 'build', codeBranch: 'dev', buildBranch: 'develop' }, } - if (!mapping[env]) { console.log(chalk.red(`not exist ${env} branch`)); return; diff --git a/package.json b/package.json index 5bb2166..68f11ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zq_auto_publish", - "version": "1.0.6", + "version": "1.0.7", "description": "", "main": "index.js", "bin": {