From 2ab0cc208ccd64d9f0e3edfa07966d43ccabb079 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 20 九月 2024 10:23:55 +0800 Subject: [PATCH] 传文件修改 --- scripts/deploy.js | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/deploy.js b/scripts/deploy.js index ba03c1c..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,8 +7,14 @@ `); exit(); // 閫�鍑鸿剼鏈� } +const myEnv = deployEnv==='pro'?'prod':'dev' changeBranch(); checkCustomer('npm run deploy'); -uploadFiles(); +// uploadFiles(); +try { + execSync(`npx deploy ${myEnv}`, { stdio: 'inherit' }); +} catch (error) {} + + -- Gitblit v1.9.3