From e164b1ab7662ab3a2901cf609ce0f68f7298ce25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Mon, 15 Sep 2025 16:18:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compile.sh => compile_dev.sh | 0 compile_test.sh => compile_prod.sh | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) rename compile.sh => compile_dev.sh (100%) rename compile_test.sh => compile_prod.sh (80%) mode change 100755 => 100644 diff --git a/compile.sh b/compile_dev.sh similarity index 100% rename from compile.sh rename to compile_dev.sh diff --git a/compile_test.sh b/compile_prod.sh old mode 100755 new mode 100644 similarity index 80% rename from compile_test.sh rename to compile_prod.sh index ea743fa..b0b23a1 --- a/compile_test.sh +++ b/compile_prod.sh @@ -1,9 +1,9 @@ #!/bin/bash -BRANCH_NAME="dev" +BRANCH_NAME="prod" # 修改项目名称 -PROJECT_NAME="video-flow-frontend-test" +PROJECT_NAME="video-flow-$BRANCH_NAME-frontend" # 设置日志文件路径 LOGFILE="build_and_copy.log" @@ -14,9 +14,9 @@ echo "Build process started at $(date)" | tee $LOGFILE # 获取当前分支名 current_branch=$(git rev-parse --abbrev-ref HEAD) -# 打包之前,需要检查是否在 dev 分支,工作区是否干净,是否和远程分支一致 +# 打包之前,需要检查是否在 prod 分支,工作区是否干净,是否和远程分支一致 if [ "$(git branch --show-current)" != "$BRANCH_NAME" ]; then - echo "当前分支不是 dev 分支" + echo "当前分支不是 prod 分支" exit 1 fi @@ -35,7 +35,7 @@ fi # 检查当前分支并运行相应的 npm 命令 if [ "$current_branch" = "$BRANCH_NAME" ]; then - echo "On dev branch, building project..." | tee -a $LOGFILE + echo "On prod branch, building project..." | tee -a $LOGFILE PROFILE_ENV=$BRANCH_NAME # 安装依赖并构建 @@ -50,7 +50,7 @@ if [ "$current_branch" = "$BRANCH_NAME" ]; then cp package-lock.json dist/ else - echo "On non-dev branch ($current_branch), exiting" + echo "On non-prod branch ($current_branch), exiting" exit 1 fi