From 8526b974cfe1b270902d5c284faef3bc2ac6d63a Mon Sep 17 00:00:00 2001 From: yangyin <18723093654@163.com> Date: 星期五, 13 十二月 2024 10:23:40 +0800 Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.Admin.V1.0 into test --- scripts/deploy.js | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/deploy.js b/scripts/deploy.js index 8741ff7..dc4b627 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -1,4 +1,5 @@ -const { uploadFiles, customerList,checkCustomer,changeBranch} = require('./helper'); +const { uploadFiles, customerList, checkCustomer, changeBranch,deployEnv } = require('./helper'); +const { execSync } = require('child_process'); if (!customerList || customerList.length === 0) { logError(`璇锋纭娇鐢ㄥ懡浠� 鈥渘pm run deploy [customer1,customer2,customer3,...]鈥濓紝 @@ -6,7 +7,14 @@ `); exit(); // 閫�鍑鸿剼鏈� } +const myEnv = deployEnv==='pro'?'prod':'dev' +changeBranch(); -checkCustomer('npm run deploy') +checkCustomer('npm run deploy'); -uploadFiles(); +// uploadFiles(); +try { + execSync(`npx deploy ${myEnv}`, { stdio: 'inherit' }); +} catch (error) {} + + -- Gitblit v1.9.3