From c83eca5e88d7bf16c31e755a38373145eb17a0f7 Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Sun, 13 Sep 2026 18:22:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(packaging):=20package-windows.sh=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20DIST=5FLINUX/BUILD=5FDIR/DIST=5FRELEASE=20?= =?UTF-8?q?=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 我在 v1.3.10 的 tag worktree 里调这个脚本,而它提交在 main(tag 里当然没有)⇒ `No such file or directory`;又因为脚本没加 `set -e`,它继续往下跑,把只含 4 项 (linux amd64)的校验和传上去,覆盖掉了原本覆盖 10 项的那份。 目录可覆盖后就能「用主仓脚本、产物目录指向 worktree」,两个坑一起消掉。 --- deploy/packaging/package-windows.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/packaging/package-windows.sh b/deploy/packaging/package-windows.sh index 4349241..c0ab491 100644 --- a/deploy/packaging/package-windows.sh +++ b/deploy/packaging/package-windows.sh @@ -16,8 +16,11 @@ set -euo pipefail PROJECT_ROOT="$(cd "$(dirname "$0")/../.." && pwd)" +# 三个目录都可覆盖:发布件常在 tag 的干净 worktree 里构建,而这个脚本本身 +# 可能只存在于 main(例如刚补的驱动脚本还没进 tag)——那种情况下用主仓的脚本 + +# DIST_LINUX/BUILD_DIR/DIST_RELEASE 指向 worktree,避免"脚本不存在"或产物错位。 BUILD_DIR="${BUILD_DIR:-$PROJECT_ROOT/build}" -DIST_LINUX="$PROJECT_ROOT/dist/linux" +DIST_LINUX="${DIST_LINUX:-$PROJECT_ROOT/dist/linux}" DIST_RELEASE="${DIST_RELEASE:-$PROJECT_ROOT/dist/release}" VARIANT="${1:-server}"