From a1a6827edea6100849b28d0ef3cdc99c23d8b125 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期二, 19 十一月 2024 11:21:17 +0800 Subject: [PATCH] 集成 wi.amis --- scripts/publish.js | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/scripts/publish.js b/scripts/publish.js index 6b8711d..7a47652 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -1,16 +1,19 @@ const { execSync } = require('child_process'); -const { customerList, checkCustomerDirExist, logError,exit,firstCustomerName } = require('./helper'); +const { customerList, checkCustomerDirExist, logError,exit,firstCustomerName,changeBranch } = require('./helper'); // if (!customerList || customerList.length === 0) { // logError(`璇锋纭娇鐢ㄥ懡浠� 鈥渘pm run publish [customer1,customer2,customer3,...]鈥濓紝 // 閮ㄧ讲鍒扮敓浜х幆澧冨啓娉曪細customer:pro // `); // } + + if (customerList?.length !== 1) { logError(`璇锋纭娇鐢ㄥ懡浠� 鈥渘pm run publish customer鈥濓紙鐩墠鍙敮鎸佷竴娆¢儴缃蹭竴涓級`); exit(); // 閫�鍑鸿剼鏈� } +changeBranch(); customerList.forEach((item) => { const customerSplit = item.split(':'); @@ -18,6 +21,8 @@ checkCustomerDirExist(customerName); }); + + try { // 闅忎究鎷跨涓�涓敤浜� build execSync(`npm run build ${firstCustomerName}`, { stdio: 'inherit' }); -- Gitblit v1.9.3