From 6ce67176da7f61cd75dc9b350e91446e1c82b555 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Tue, 7 Jul 2026 11:27:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci/macos):=20=E6=9E=84=E5=BB=BA=E5=90=8E?= =?UTF-8?q?=E4=BB=8E=20WORK=20=E7=9B=AE=E5=BD=95=20embed=20=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E6=96=87=E4=BB=B6(xcodebuild=20=E4=BC=9A=E6=B8=85=20P?= =?UTF-8?q?ROF=5FDIR)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build-macos 失败:flutter build macos 期间 xcodebuild 修剪 ~/Library/Developer/Xcode/UserData/Provisioning Profiles,把构建前装进去的 Developer ID 描述文件删掉,构建后 inside-out 重签时从该目录 cp 扑空 (cp: .provisionprofile: No such file → exit 1)。改为从 mktemp 的 WORK 目录复制原始 .provisionprofile(xcodebuild 不碰),幂等可靠。 Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u --- scripts/ci/compile-macos.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/ci/compile-macos.sh b/scripts/ci/compile-macos.sh index f46033d..551d3b5 100755 --- a/scripts/ci/compile-macos.sh +++ b/scripts/ci/compile-macos.sh @@ -223,8 +223,12 @@ PLIST echo "==> compile-macos: inside-out codesign (sysext -> frameworks -> app)" xattr -cr "$APP" -cp "$SYSEXT_PROFILE" "${SE}/Contents/embedded.provisionprofile" -cp "$APP_PROFILE" "${APP}/Contents/embedded.provisionprofile" +# 从 WORK 临时目录复制(不是 PROF_DIR):flutter build macos 期间 xcodebuild 会 +# 修剪 ~/Library/Developer/Xcode/UserData/Provisioning Profiles,把[3/7]构建前 +# 装进去的 profile 清掉,构建后再从那目录 cp 会扑空(No such file → 本步失败)。 +# WORK 是 mktemp 目录、xcodebuild 不碰,里面的原始 .provisionprofile 全程留存。 +cp "${WORK}/sysext.provisionprofile" "${SE}/Contents/embedded.provisionprofile" +cp "${WORK}/app.provisionprofile" "${APP}/Contents/embedded.provisionprofile" # sysext first — libbox is linked (not embedded) into the sysext binary # itself (see CLAUDE.md), so signing the sysext bundle re-covers its statically