From 00df4135c73a0f7453854b65c83f9781049b6ac2 Mon Sep 17 00:00:00 2001 From: milky0217 Date: Sun, 7 Jun 2026 16:37:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20deploy.sh=E9=83=A8=E7=BD=B2=E5=90=8E?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=B0=83=E7=94=A8switch-env.sh=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 30c2938..bebe316 100755 --- a/deploy.sh +++ b/deploy.sh @@ -155,8 +155,12 @@ if run_tests; then if [ -n "$BG_TARGET" ]; then echo -e " 目标: ${BG_TARGET} (:${BG_PORT})" echo -e "" - echo -e " ${YELLOW}切换命令:${NC}" - echo -e " ./scripts/switch-env.sh --switch ${BG_TARGET}" + echo -e " ${YELLOW}自动切换代理...${NC}" + if bash "${SCRIPT_DIR}/scripts/switch-env.sh" --switch "${BG_TARGET}" 2>&1; then + log_info "代理已切换至 ${BG_TARGET} (:${BG_PORT})" + else + log_warn "代理切换失败,请手动执行: ./scripts/switch-env.sh --switch ${BG_TARGET}" + fi fi echo "" [ "$POST_DEPLOY_LOGS" = true ] && { echo ""; view_logs; }