From 5302b22fc1474ad4834ab79b6da1c9b81e179e27 Mon Sep 17 00:00:00 2001 From: lunanting Date: Thu, 17 Sep 2026 11:55:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=97=A7=E7=89=88Git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/production/build-frontend.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/production/build-frontend.sh b/deploy/production/build-frontend.sh index 9daeb54..5a7408c 100755 --- a/deploy/production/build-frontend.sh +++ b/deploy/production/build-frontend.sh @@ -4,9 +4,9 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" FRONTEND_DIR="$REPO_DIR/frontend" -SOURCE_GIT_FULL_SHA="$(git -C "$REPO_DIR" rev-parse HEAD)" -SOURCE_GIT_SHA="$(git -C "$REPO_DIR" rev-parse --short HEAD)" -SOURCE_GIT_REF="$(git -C "$REPO_DIR" branch --show-current 2>/dev/null || true)" +SOURCE_GIT_FULL_SHA="$(cd "$REPO_DIR" && git rev-parse HEAD)" +SOURCE_GIT_SHA="$(cd "$REPO_DIR" && git rev-parse --short HEAD)" +SOURCE_GIT_REF="$(cd "$REPO_DIR" && git symbolic-ref --quiet --short HEAD 2>/dev/null || true)" SOURCE_GIT_REF="${SOURCE_GIT_REF:-main}" test -f "$FRONTEND_DIR/package-lock.json" || {