Commit f62862078a

f62862078ab837731a083eede5aa6e47e9e5fd46

parent: 727b7a9fbb

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-11 06:16 UTC

Release script: the Sparkle public key as the default

Layout: unified · split

docs/plans/2026-10-10-sparkle-updates.md +2 −2
@@ -122,7 +122,7 @@ CommandGroup(after: .appInfo) {
122122- Create: `scripts/appcast-add.sh`
123123- Modify: `docs/manual/orgo.toml` only if orgo needs the file listed to copy it (check with `scripts/publish-docs.sh --dry-run` and `ls` of the built site; `favicon.svg` and `style.css` are copied today, so it should not)
124124
125- [ ] Generate the key pair once on the release Mac (not done here; it writes a private key to the login keychain): `"$(find .build/artifacts -name generate_keys -type f | head -1)"`. The private key goes to the login keychain; paste the printed public key as the `ORGSTAR_ED_PUBLIC_KEY` default in `release-mac.sh`.
125- [x] Generate the key pair once on the release Mac (done 2026-10-11; the public key is `release-mac.sh`'s default): `"$(find .build/artifacts -name generate_keys -type f | head -1)"`. The private key goes to the login keychain; paste the printed public key as the `ORGSTAR_ED_PUBLIC_KEY` default in `release-mac.sh`.
126126- [x] The empty appcast:
127127
128128```xml
@@ -190,4 +190,4 @@ sh scripts/publish-docs.sh
190190- Sparkle 2.10 from its SwiftPM package. `scripts/build-app.sh` copies the framework into `Contents/Frameworks`, adds the rpath, and for signed builds writes `SUFeedURL` and `SUPublicEDKey` (from `ORGSTAR_ED_PUBLIC_KEY`) into the Info.plist; a dev build has neither, so `Updates.start()` doesn't start the updater and Check for Updates… stays disabled.
191191- `Sources/Orgstar/Updates.swift` holds the `SPUStandardUpdaterController`, `canCheck` through Sparkle's KVO publisher, and the automatic-checks setting, shown in Settings ▸ General only when the updater runs.
192192- `scripts/appcast-add.sh` signs the DMG with `sign_update` and prepends the item; `SIGN_UPDATE` names another signer for a dry run. `scripts/release-mac.sh` runs it on a copy with `ORGSTAR_PUBLISH=0`, and for real after the DMG upload, through a merge request, then publishes the manual, which carries `docs/manual/appcast.xml`.
193- Checked: the dev bundle launches with the framework and passes `codesign --verify --strict --deep`; the appcast script with a stub signer, twice (the second run refuses the version); `release-mac.sh` parses. Not checked: a signed build against a local appcast, which needs the Developer ID and the generated key.
193- Checked: the dev bundle launches with the framework and passes `codesign --verify --strict --deep`; the appcast script with a stub signer, twice (the second run refuses the version); `release-mac.sh` parses. With the key generated: a Developer ID build carries `SUFeedURL` and `SUPublicEDKey`, verifies strictly with Sparkle signed inside it, and `sign_update` signs a DMG from the keychain, `--verify` accepts the signature, and `appcast-add.sh` writes the real entry. Not checked: the update dialog itself, which needs a second build to offer.
scripts/release-mac.sh +4 −4
@@ -6,8 +6,8 @@
66# ORGSTAR_NOTARY notarytool keychain profile (default: orgstar)
77# ORGSTAR_TAP the homebrew-tap checkout (default: ../homebrew-tap)
88# ORGSTAR_PUBLISH 0 builds and notarizes without tagging, uploading or touching the tap
9# ORGSTAR_ED_PUBLIC_KEY the Sparkle public key, as generate_keys printed it (the private key
10# is in the login keychain); passed on to build-app.sh and sign_update
9# ORGSTAR_ED_PUBLIC_KEY the Sparkle public key (default: the one whose private half is in the
10# release Mac's login keychain, from generate_keys); passed on to build-app.sh
1111#
1212# Updates: after the DMG is uploaded, the release goes into docs/manual/appcast.xml through a
1313# merge request on main, and the manual is published, which serves the appcast.
@@ -21,8 +21,8 @@ tap="${ORGSTAR_TAP:-../homebrew-tap}"
2121publish="${ORGSTAR_PUBLISH:-1}"
2222sign="${ORGSTAR_SIGN:-$(security find-identity -v -p codesigning | sed -n 's/.*"\(Developer ID Application: .*\)"/\1/p' | head -1)}"
2323[ -n "$sign" ] || { echo "No Developer ID Application identity in the keychain." >&2; exit 1; }
24: "${ORGSTAR_ED_PUBLIC_KEY:?set ORGSTAR_ED_PUBLIC_KEY to the key generate_keys printed}"
25export ORGSTAR_ED_PUBLIC_KEY
24# The Sparkle public key; its private half is in the release Mac's login keychain (generate_keys).
25export ORGSTAR_ED_PUBLIC_KEY="${ORGSTAR_ED_PUBLIC_KEY:-StvsRDaDoGd4S/G66l7XHAcd3KPlpJlu0Gsv9GemsSo=}"
2626notes="Universal (Apple silicon and Intel), macOS 26 or later. Notarized."
2727
2828if [ "$publish" != 0 ]; then