Skip to content

Turn on automatic updates from this repo's own signed feed - #2

Merged
Falhoo merged 1 commit into
Falhoo:mainfrom
SkillzNoLogic:auto-updates
Nov 27, 2026
Merged

Falhoo merged 1 commit into
Falhoo:mainfrom
SkillzNoLogic:auto-updates

Conversation

@SkillzNoLogic

Copy link
Copy Markdown
Collaborator

Why

"Check for Updates" in the combined build only shows "Updates are turned off". The only feed the app knew was plain macSteam's (Selectively11). It would have replaced this app with plain macSteam, so the updater was stubbed out, and users have to find and install each new DMG by hand.

What this does

  • UpdaterManager.swift: starts Sparkle and makes "Check for Updates…" work. A build without a feed or key shows a short explanation instead of an error.
  • build.sh: when a public key is set, the build adds this repo's appcast.xml as the update feed, the public key, and automatic checks to the app's Info.plist. The build number is now the real version (0.8.10) instead of a fixed 19; Sparkle compares build numbers, so with 19 it could never see a newer release.
  • scripts/appcast-add.sh: signs a release DMG with your Keychain key and adds it to the top of appcast.xml. It escapes the release notes and refuses to add a version twice.
  • appcast.xml: cleared. Its entries pointed at other repos (crghofficial, Selectively11) and were signed with keys this app won't use.
  • macsteam-app/Info.plist: feed points at this repo; the old key is removed.

Nothing changes until you add a key. With SPARKLE_PUBLIC_KEY empty, build.sh leaves all update settings out and the app behaves as it does today. A key is needed because the app is ad-hoc signed, so Sparkle will only install an update signed with a key it trusts.

One-time setup

  1. Create a signing key. It is stored in your login Keychain, and the command prints the public half:
    macsteam-app/.build/artifacts/sparkle/Sparkle/bin/generate_keys
    
  2. Paste the printed public key after :- on the SPARKLE_PUBLIC_KEY= line in build.sh, and commit it. The public key is safe to commit. Back up the private key (generate_keys -x <file>): if it's lost, installed copies can never accept another update.

Each release

  1. ./build.sh, make the DMG, and upload it to the GitHub release as you do now.
  2. Run ./scripts/appcast-add.sh dist/macSteam-X.Y.Z.dmg X.Y.Z [notes.md]. The download link defaults to the DMG on the vX.Y.Z release.
  3. Commit and push appcast.xml. Installed copies see the update on their next check, once a day by default.

Copies installed before the first key-carrying release can't update themselves. Each user installs that one release by hand, and later releases update automatically.

Testing

  • UpdaterManager.swift type-checks against Sparkle 2.10.0.
  • build.sh's Info.plist output is valid both with no key (no update keys, build number set from the version) and with a key (feed and key present).
  • appcast-add.sh produced a valid feed from a test DMG, the signature verified against the signing key, and adding a version twice was refused.
  • A fork has shipped the same updater code with its own feed. I haven't installed a release and watched it update itself end to end.

🤖 Generated with Claude Code

The updater was stubbed out because the only feed was plain macSteam's,
which would replace this combined build. Updates now come from this
repo's appcast.xml, and each one must be signed with this repo's
Sparkle key, since the app itself is only ad-hoc signed.

They stay off until SPARKLE_PUBLIC_KEY in build.sh holds that key, so
builds behave as before until then. build.sh also uses the real version
as the build number (it was always 19), so Sparkle can tell a newer
release apart. scripts/appcast-add.sh signs a release DMG and adds it to
the feed. The old feed entries pointed at other repos and keys, so the
feed starts empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Falhoo
Falhoo merged commit a453adc into Falhoo:main Nov 27, 2026
1 check failed
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.

2 participants