From baca9081dd77582a95e336950bda68db79ab00ce 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: Fri, 4 Jul 2025 16:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E9=A2=91=E8=A2=AB?= =?UTF-8?q?=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compile.sh | 15 +++++++++++++-- components/pages/work-flow.tsx | 2 +- components/pages/work-flow/media-viewer.tsx | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/compile.sh b/compile.sh index 74932d8..61ad53b 100755 --- a/compile.sh +++ b/compile.sh @@ -24,9 +24,20 @@ if [ -n "$(git status --porcelain)" ]; then exit 1 fi +# 获取最新的远程分支信息 +echo "正在获取最新的远程分支信息..." | tee -a $LOGFILE +git fetch origin + # 检查远程分支是否和本地分支一致 -if [ "$(git rev-parse HEAD)" != "$(git rev-parse origin/dev)" ]; then - echo "本地分支和远程分支不一致" +local_commit=$(git rev-parse HEAD) +remote_commit=$(git rev-parse origin/dev) +if [ "$local_commit" != "$remote_commit" ]; then + echo "本地分支和远程分支不一致" | tee -a $LOGFILE + echo "本地分支: $local_commit" | tee -a $LOGFILE + echo "远程分支: $remote_commit" | tee -a $LOGFILE + echo "请运行以下命令之一来解决:" | tee -a $LOGFILE + echo " git pull origin dev # 如果远程有新提交" | tee -a $LOGFILE + echo " git push origin dev # 如果本地有新提交" | tee -a $LOGFILE exit 1 fi diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx index 3e987fe..955fd14 100644 --- a/components/pages/work-flow.tsx +++ b/components/pages/work-flow.tsx @@ -230,7 +230,7 @@ export default function WorkFlow() { )} -