From d43a9b7b743bc27b2a8740e97f55a1f352ac00c0 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 03 一月 2025 10:53:21 +0800 Subject: [PATCH] updateInputValue bug --- scripts/publish.js | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/publish.js b/scripts/publish.js index c948d49..7a47652 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -1,17 +1,19 @@ const { execSync } = require('child_process'); -const { customerList, checkCustomerDirExist, logError } = 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 // `); -// process.exit(1); // 閫�鍑鸿剼鏈� // } + + if (customerList?.length !== 1) { logError(`璇锋纭娇鐢ㄥ懡浠� 鈥渘pm run publish customer鈥濓紙鐩墠鍙敮鎸佷竴娆¢儴缃蹭竴涓級`); - process.exit(1); // 閫�鍑鸿剼鏈� + exit(); // 閫�鍑鸿剼鏈� } +changeBranch(); customerList.forEach((item) => { const customerSplit = item.split(':'); @@ -19,9 +21,11 @@ checkCustomerDirExist(customerName); }); + + try { // 闅忎究鎷跨涓�涓敤浜� build - execSync(`npm run build ${customerList[0].split(':')[0]}`, { stdio: 'inherit' }); + execSync(`npm run build ${firstCustomerName}`, { stdio: 'inherit' }); } catch (error) {} try { -- Gitblit v1.9.3