From 04d7a27d89e1b889dd8c504112fc45679d7e104f Mon Sep 17 00:00:00 2001 From: xiejianxiong Date: Mon, 14 Sep 2020 11:05:30 +0800 Subject: [PATCH] auto publish --- bin/auto-publish.js | 9 +++------ package.json | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) 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": {