Skip to content

Add Sparkle auto-updates and Sparkle-free Mac App Store target - #78

Merged
austin-smith merged 3 commits into
mainfrom
sparkle-auto-updates
Jul 16, 2026
Merged

austin-smith merged 3 commits into
mainfrom
sparkle-auto-updates

Conversation

@austin-smith

Copy link
Copy Markdown
Owner

What Changed

Sparkle auto-updates for the direct-download (GitHub) build:

  • Sparkle 2.9.4 via SPM, linked to the app target with a macOS platform filter (never reaches iOS builds).
  • All Sparkle surface lives in UpdaterController.swift behind #if os(macOS) && canImport(Sparkle): Check for Updates… in the app menu, an auto-check toggle in Settings → General.
  • Sandbox-compliant setup: Installer XPC service enabled, macOS-only entitlements file with the network-client entitlement and Sparkle's mach-lookup exceptions, wired via CODE_SIGN_ENTITLEMENTS[sdk=macosx*].
  • SUFeedURL points at GitHub Pages; SUPublicEDKey embedded (private key lives in the repo secret SPARKLE_ED_PRIVATE_KEY).
  • Release workflow gains two jobs after the DMG release: generate a signed appcast.xml from all release DMGs (v0.8.3+) with release notes embedded from CHANGELOG.md, then deploy it to GitHub Pages. Deltas disabled (--maximum-deltas 0).
  • GitHub release notes now come from the tag's CHANGELOG.md section (fallback: --generate-notes), so one write shows up in both the release page and the update dialog.
  • CHANGELOG.md added, built from the existing GitHub release notes (v0.3.0–v0.8.2).

Mac App Store target:

  • New ComputerSolitaireAppStore target + shared scheme: macOS-only, same sources, same bundle ID/product name, no Sparkle package, no Sparkle entitlements, own Info-AppStore.plist without Sparkle keys.
  • CI gains a mas-build job so the Sparkle-free path compiles on every PR.

Versioning:

  • CURRENT_PROJECT_VERSION now mirrors MARKETING_VERSION (0.8.3), single-sourced at the project level so both targets inherit. Enforced by tag-version.sh and the release workflow — Sparkle compares CFBundleVersion, which was previously stuck at 1.

Why

Users currently have no way to learn about or install new versions of the GitHub build. Sparkle gives the direct-download channel in-app updates; the Mac App Store build (which cannot ship Sparkle) gets a dedicated target that compiles the updater away via canImport(Sparkle), with CI keeping that path green.

UI Changes

  • New "Check for Updates…" item in the app menu after About (direct build only).
  • New Updates section with an "Automatically check for updates" toggle at the bottom of Settings → General (direct build only); General pane height adjusted.
  • Sparkle's standard update dialog appears when an update is found.

Validation

  • macOS Debug build: Sparkle.framework embedded, signed entitlements carry sandbox + network-client + both mach-lookup exceptions; versions read 0.8.3/0.8.3.
  • Mac App Store target build + archive: no Sparkle.framework, no SU* Info.plist keys, sandbox-only entitlements, versions inherited correctly.
  • iOS Simulator build: succeeds, no Sparkle embedded, no Frameworks directory.
  • Unit tests: pass (xcodebuild test, macOS).
  • End-to-end update test: built 0.8.3 with a test EdDSA key, packaged a 0.9.9 DMG, generated a signed appcast, served locally, and confirmed the sandboxed app checked, downloaded, validated, and installed the update in place (0.8.3 → 0.9.9) via the Installer XPC service.
  • generate_appcast flags validated against the same pinned Sparkle 2.9.4 tools CI downloads (checksum-verified); changelog section extraction verified for every existing version.
  • Workflow YAML and shell syntax validated.

Remaining setup (outside this PR): repo Settings → Pages → Source: "GitHub Actions". Note the first Sparkle-capable release is v0.8.3 — 0.8.2 installs predate Sparkle, so the first real over-the-air update is 0.8.3 → 0.8.4.

@cursor

cursor Bot commented Jul 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@austin-smith austin-smith changed the title Add Sparkle auto-updates and a Sparkle-free Mac App Store target Add Sparkle auto-updates and Sparkle-free Mac App Store target Jul 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7047123fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release.yml
@austin-smith

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35f94e0696

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release.yml
@austin-smith austin-smith linked an issue Jul 16, 2026 that may be closed by this pull request
@austin-smith
austin-smith merged commit de6c691 into main Jul 16, 2026
3 checks passed
@austin-smith
austin-smith deleted the sparkle-auto-updates branch July 16, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Sparkle auto-update support for macOS

1 participant