Skip to content

feat: check for and install updates in the app, on a stable or beta track - #100

Merged
Seb-GRAF merged 4 commits into
mainfrom
feat/22-updates
Oct 19, 2026
Merged

Seb-GRAF merged 4 commits into
mainfrom
feat/22-updates

Conversation

@Seb-GRAF

Copy link
Copy Markdown
Collaborator

Problem

StableBar can't tell you that a new version exists or install it, and you can't see which version you run. Fixes #22.

This branch includes #59 (the About tab with the version), rebased onto main, because the update controls live in its About section.

Changes

  • Updates in the bar. Sparkle 2.10 checks the feed once a day. Instead of Sparkle's windows, an Update tile appears at the right end of the bar, drawn like the theme's other widgets. Its popup, in the theme's popup style, lists the release's changes (the bullet points of its GitHub notes), links the release and offers Download, then Install and Relaunch. AppUpdate is Sparkle's user driver, so Sparkle still checks, downloads, verifies and installs.
  • Check and settings. Check for Updates… is in the menu-bar icon's menu. Customize → About gets an Updates section: the update track (Stable or Beta), automatic checks, automatic installs, and the tile's button while an update waits.
  • Update track. Beta adds Sparkle's beta channel, so betas get whichever is newer, a beta or a stable release. An installed beta starts on Beta, and keeps it after updating to a stable release. The track is stored in UserDefaults, like setupCompleted.
  • Trust. As decided in Check for and install updates in the app, on a stable or beta channel #22's thread, updates are trusted through the Developer ID signature, without an EdDSA key. prepare-app-info.sh keeps SUFeedURL only in Developer ID-signed release builds: an ad-hoc build can't prove an update comes from the same developer, so ad-hoc and local builds don't check, and About links to the releases page instead.
  • Build. build.sh embeds Sparkle.framework, adds the @executable_path/../Frameworks rpath and, when signing with an identity, re-signs Sparkle's helpers before the framework and the app, as Sparkle's documentation shows.
  • CI (the ci: commit). import-developer-id.sh imports the Developer ID certificate and the notarization key from the repository's secrets into a temporary keychain; without them, builds stay ad-hoc signed. Both jobs then sign and notarize, and publish-appcast.sh adds the release to appcast.xml on a rolling appcast prerelease, like the store's index: betas on the beta channel, each item with its release notes and a link. generate_appcast marks Apple silicon builds, so Intel Macs aren't offered them. The secrets and variables are already set.
  • Docs. README: Updates, Download a release and Customize → About. CONTRIBUTING: the signing setup and the feed.

Testing

  • swift test: 310 tests pass. New ones cover which builds keep the feed, the release notes parsing (GitHub's generated notes and semantic-release's), and the tile staying at the bar's right end at every stage.
  • The real Sparkle flow, rendered offscreen against a local feed: it found the beta, showed the tile and the changes, downloaded and verified the update, and reached Install and Relaunch. Quitting there installed it (build 1 → 2).
  • A local build signed with the Developer ID was notarized by Apple (Accepted) and stapled. Gatekeeper: accepted, source=Notarized Developer ID. Sparkle's helpers carry the team ID and hardened runtime, and the app launches with library validation.
  • Two builds signed by the same identity satisfy each other's designated requirement; two ad-hoc builds don't.
  • publish-appcast.sh with a stand-in for gh: stable, beta, then stable keeps both channels, each item with its own notes and link. The stored certificate secret imports into a throwaway keychain and CI's lookup finds the identity.
  • Not tested: clicking Install and Relaunch (the relaunched test app would have started with the real configuration), and the beta and release jobs, which only run on main.
  • Screenshots to follow: the tile, its popup before and after the download, and the About section with and without an update.

Merging

Rebase merge or merge commit, so each feat:, fix: and ci: commit reaches the changelog. Merging this also lands #59's two commits; alternatively merge #59 first and rebase this branch.

Installs from today's ad-hoc betas can't verify a Developer ID update, so their users install the first signed build by hand once.

Claude Opus 5.5 via Claude Code in T3 Code.

@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check for and install updates in the app, on a stable or beta channel

2 participants