fix(ci): repair macOS installer packaging and validate artifacts - #185
Merged
Conversation
Keep pkg arguments nonempty for macOS Bash 3.2 nounset, accept both Uno CLI bundle layouts, and pass plist paths as data. Exercise the actual release step and build and inspect an unsigned package in the macOS PR gate.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Select an executable CLI candidate before accepting its bundle location. Cover an unusable MacOS candidate with a valid Resources fallback and reject two unusable candidates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.5.0 的 macOS 发布打包在未配置 installer 签名时失败:系统 Bash 3.2 在
set -u下展开空signing_args会报unbound variable。后续 builder 又只接受Contents/MacOS/cli,而本次 Uno 产物的 CLI 实际位于Contents/Resources/cli。本次修复让参数数组包含必需参数,按安装脚本的顺序探测两个 CLI 位置,并通过参数传递 plist 路径,支持含单引号的目录。产物检查同步采用可执行候选规则,避免第一个不可执行文件遮住第二个有效位置。现有 macOS PR job 改为发布携带 CLI 的
.app、构建 unsigned.pkg、展开真实包、核对包内 postinstall,并在临时根执行安装脚本及链接后的 CLI。发布 workflow 也在上传前执行同一产物检查。AGENTS.md 补充目标 shell 与打包入口的回归规则。修改文件:
.github/workflows/release-packaging.yml:修复 Bash 3.2 参数数组,上传前核验真实 pkg。.github/workflows/platform-build-gates.yml:将安装包构建与执行检查接入现有 macOS PR job。scripts/release/build-macos-pkg.sh:支持两个 CLI 位置,并安全读取带引号路径的 plist。scripts/gates/macos_pkg_build_contract.py:10 个用例执行真实发布步骤,覆盖签名参数、目录和拒绝分支。scripts/gates/run-macos-pkg-artifact-gate.sh:展开真实包、核对包内脚本、在临时根执行并验证命令。scripts/gates/run-release-artifact-contract-gate.sh:统一可执行候选选择,补回退和拒绝自测。AGENTS.md:记录目标 shell 与安装包入口的验证规则。验证:
build-pkg步骤及 builder,仅替换平台工具。unbound variable、缺少 CLI、Python 字符串语法错误;恢复后通过。另确认产物检查在修复前拒绝可执行候选回退,修复后通过。GitHubWorkflowContractTests:16/16 通过;现有安装链接检查 15 项、产物检查自测 24 项、workflow 检查自测 15 项及 9 个 workflow 检查通过。git diff --check通过。构建只出现既有 C# 警告。当前 PR head
fa0e3c609b058f96e1f93a964020706c92457913的 CI 证据:artifacts/macos/SalmonEgg-1.5.1.pkg,确认 CLI 在Contents/Resources/cli;校验和、真实pkgutil --expand-full、包内 postinstall 与链接后的 Mach-O--version均通过。产物来自该 PR 的测试合并提交97dcdd019dcd6fe672f164c4e1881cf37977228d,版本为1.5.1-alpha.0.2+97dcdd019dcd6fe672f164c4e1881cf37977228d。签名、公证与系统全局安装未验证;本次在真实包的临时展开目录执行包内安装脚本。
失败依据:https://github.com/salmonloop/salmon-egg/actions/runs/34225171678
最终检查:当前 head
fa0e3c60的 12 项检查通过,Deterministic GUI Smoke Gates 按既有配置跳过;无失败或等待项,PR 无冲突(MERGEABLE / CLEAN)。