From fad17ddde97df0fcbb66f36f7d5c9bb4256fb181 Mon Sep 17 00:00:00 2001 From: jim800121chen Date: Sat, 16 May 2026 23:49:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20scripts/deploy-stage-v2.sh=20?= =?UTF-8?q?=E2=80=94=20=E4=BF=AE=E5=85=A9=E5=80=8B=E5=85=A8=E5=BD=A2?= =?UTF-8?q?=E5=8F=B3=E6=8B=AC=E8=99=9F=20typo=20=E5=8D=A1=20shell=20parsin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 兩處 `\$STAGE_VERSION)` / `\$status)` 含 UTF-8 U+FF09 全形右括號(mojibake / 中文輸入法殘留);shell 把全形 `)` 當 var name 一部分、解析成 `$STAGE_VERSION)` / `$status)` 變數、unbound variable 中斷 script。 為什麼今天才暴露:5/9 第一次 v2 trial 卡在 build context 上傳階段(VPN 下 docker daemon 大 POST hang)、從沒跑到 line 120 / 196。今天 VPN 順、第一次 build + deploy 整段跑通才撞兩個 typo。 修法:兩處全形 `()` 改半形 `()`、不影響日誌可讀性。 Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/deploy-stage-v2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/deploy-stage-v2.sh b/scripts/deploy-stage-v2.sh index 89ebca2..aa5bf2d 100755 --- a/scripts/deploy-stage-v2.sh +++ b/scripts/deploy-stage-v2.sh @@ -117,7 +117,7 @@ if ! DOCKER_HOST="$DOCKER_REMOTE" docker version --format '{{.Server.Version}}' - v2 模式跨網路傳 ~44 MB build context,比 v1 友善但仍非 100% 保證" fi STAGE_VERSION=$(DOCKER_HOST="$DOCKER_REMOTE" docker version --format '{{.Server.Version}}' 2>/dev/null || echo unknown) -info "stage daemon 連線 OK(server version: $STAGE_VERSION)" +info "stage daemon 連線 OK (server version: $STAGE_VERSION)" # git 狀態(warn only) cd "$PROJECT_ROOT" @@ -193,7 +193,7 @@ done if [ "$healthy" = true ]; then info "container healthy ✓" else - warn "container healthcheck 超時(status=$status)— 注意 5/1 已知 healthcheck 從 container 內被 nginx server_name 擋成 444 是 false negative,外部 healthz 才是真實狀態" + warn "container healthcheck 超時 (status=$status) — 注意 5/1 已知 healthcheck 從 container 內被 nginx server_name 擋成 444 是 false negative,外部 healthz 才是真實狀態" fi if curl -fsS --max-time 10 "$HEALTHZ_URL" >/dev/null 2>&1; then