-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(release): normalize Live Host signing identity #8579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -115,6 +115,11 @@ describe('Live Host release workflow', () => { | |||||||||||||||||
| expect(liveHostReleaseWorkflow).toContain( | ||||||||||||||||||
| 'echo "APPLE_API_KEY_ID=$api_key_id"', | ||||||||||||||||||
| ); | ||||||||||||||||||
| expect(liveHostReleaseWorkflow).toContain( | ||||||||||||||||||
| 'identity_name="${identity#Developer ID Application: }"', | ||||||||||||||||||
| ); | ||||||||||||||||||
|
Comment on lines
+118
to
+120
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The three new assertions are order-insensitive substring checks, so they do not pin that
Suggested change
中文说明这三个新断言都是不敏感于顺序的子串检查,没有固定 — qwen3.8-max via Qwen Code /review (v0.21.5) |
||||||||||||||||||
| expect(liveHostReleaseWorkflow).toContain('echo "CSC_NAME=$identity_name"'); | ||||||||||||||||||
| expect(liveHostReleaseWorkflow).not.toContain('echo "CSC_NAME=$identity"'); | ||||||||||||||||||
| }); | ||||||||||||||||||
| }); | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] The why of this prefix strip is undocumented here — Electron Builder rejects a prefixed
CSC_NAME(Please remove prefix "Developer ID Application:"— verified against the pinned electron-builder 26.4.0-series source) and selects the certificate type itself, whilecodesignconsumers elsewhere in the repo want the prefixed form. Both sibling implementations of the same strip carry an explanatory comment (packages/desktop/apps/electron/scripts/build-dmg.sh:147,packages/desktop/scripts/build/darwin.ts:26); this workflow copy does not. — Concrete cost: a maintainer reconciling the three signing paths reads this as a pointless round trip (thesedabove deliberately capturesDeveloper ID Application:.*, and this line discards exactly that prefix), "simplifies" the workflow back to the prefixed form, and updates the contract test to match; nothing catches it in PR CI (the signing steps only run onworkflow_dispatchwithdry_run=false), so the regression surfaces mid-release at the Electron Builder step, after dependency install and full build time.中文说明
这里没有说明为什么要去掉证书类型前缀 —— Electron Builder 会拒绝带前缀的
CSC_NAME(Please remove prefix "Developer ID Application:",已对照锁定的 electron-builder 26.4.0 系列源码确认),并自行选择证书类型;而仓库中其他codesign消费方需要带前缀的完整形式。同一去前缀逻辑的两个兄弟实现都带解释性注释(packages/desktop/apps/electron/scripts/build-dmg.sh:147、packages/desktop/scripts/build/darwin.ts:26),工作流这份没有。—— 具体代价:后续维护者对齐三条签名路径时,会把这步看成无意义的往返(上面的sed专门捕获Developer ID Application:.*,这一行又把该前缀丢掉),于是把 workflow「简化」回带前缀的形式并同步更新契约测试;PR CI 无法发现(签名步骤只在workflow_dispatch且dry_run=false时运行),回归会在依赖安装和完整构建之后、发布中途的 Electron Builder 步骤才暴露。— qwen3.8-max via Qwen Code /review (v0.21.5)