fix: include mac updater config in signed app#168
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThese changes implement app-update.yml generation and verification for macOS builds. A new script writes channel-specific configuration to the app bundle during the build process, the Electron Builder configuration integrates this via afterPack hooks, comprehensive tests validate the generation logic, and CI workflow changes extend verification to ensure the file exists in packaged artifacts before signing. Changes
Sequence DiagramsequenceDiagram
participant Build as Build System
participant AfterPack as afterPack Hook
participant FileSystem as File System
participant AppBundle as App Bundle
participant CI as CI Workflow
participant Verify as verify_app_update_config()
Build->>Build: createConfig() with channel
Build->>Build: getPublishConfig(channel)
Build->>Build: attach publish + afterPack
Build->>AfterPack: Execute on macOS
AfterPack->>AfterPack: Check if publish exists
AfterPack->>FileSystem: serializeAppUpdateConfig()
FileSystem->>FileSystem: Format YAML (owner, repo, channel)
AfterPack->>FileSystem: writeAppUpdateConfig(resourcesDir)
FileSystem->>AppBundle: Write app-update.yml<br/>to Contents/Resources/
Build->>AppBundle: Sign & Notarize
AppBundle->>CI: Upload to Release
CI->>Verify: Run verification
Verify->>AppBundle: Check app-update.yml exists
Verify->>AppBundle: Validate provider, owner, repo, channel
Verify->>AppBundle: codesign --verify --deep --strict
Verify->>CI: Verification Result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to automatically generate and write the app-update.yml configuration file for macOS builds during the Electron packaging process. Key changes include the addition of a writeAppUpdateConfig utility, a new afterPack hook in the Electron builder configuration, and several test files to verify the configuration logic and CI/CD workflow integration. Feedback was provided to improve the robustness of the afterPack hook by preventing the overwriting of existing hooks, using packager-provided metadata for the product name, and ensuring the publish configuration is defined before use.
1d6504c to
3084358
Compare
Summary
afterPack, before signing.app-update.ymlto avoid repo drift.Why
Clicking Check for Updates in packaged PawWork can fail with
ENOENTwhenContents/Resources/app-update.ymlis missing. The release flow signs the.appbefore the finalize packaging step, so the updater config must be present before signing rather than added later.Related Issue
Fixes #165
How To Verify
Screenshots or Recordings
N/A, packaging and release workflow change only.
Checklist
dev, and my PR title and commit messages use Conventional Commits in EnglishSummary by CodeRabbit
New Features
Chores