Repository navigation
Update notifications and one-step updates - #15
Merged
Merged
Conversation
The Mac app updates itself with Sparkle 2.10.0: Check for Updates in the app menu, a Settings toggle for the daily check, a signed feed at https://kernel-hunter.github.io/mudroom/appcast.xml, updates verified against Mudroom's EdDSA key before extraction, no system profile and no silent installs. scripts/appcast.sh signs a release and adds it to the feed. The cask gets auto_updates true. The CLI checks GitHub's latest release at most once a day, on the host only, and prints one line to stderr after a command run in a terminal. It stays quiet during run, start and agent, in JSON output and under CI, and never delays a command by more than a second. MUDROOM_NO_UPDATE_CHECK=1 or `mudroom update --auto-check off` turns it off. `mudroom update` updates the way Mudroom was installed: brew upgrade for the cask, the app's updater for install.sh and the zip, a checked file swap for a Windows release zip, and the right command for Scoop and winget.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mudroom now tells people when a new version is out, and updates in one step.
Mac app
Sparkle 2.10.0, pinned exactly in Package.swift and only added on macOS, so Linux and Windows builds don't see it.
docs/appcast.xml, served by GitHub Pages at https://kernel-hunter.github.io/mudroom/appcast.xml. Pages already servesdocs/from main, so the feed lives in the repo and gets reviewed like any other file, and it's served from a CDN with the right content type instead of raw.githubusercontent.com with its rate limits.SURequireSignedFeed,SUVerifyUpdateBeforeExtraction). System profiling is off, and so isSUAllowsAutomaticUpdates: nothing installs until the user clicks Install.build-app.shembeds Sparkle.framework without its XPC services (the app isn't sandboxed), strips SwiftPM's build-folder rpath, adds@executable_path/../Frameworksand signs inside out. The bundled CLI updates with the app.scripts/appcast.sh X [sha256]downloads the release zip, checks it, signs it withsign_updateand adds the item to the feed, then signs the feed. The release notes go inline so the feed signature covers them, with a link to the GitHub release; the minimum macOS comes from the app.auto_updates true.CLI
Once a day, on the host only, the CLI asks GitHub for the latest release and prints one line to stderr after the command's output. It only does this when stdout and stderr are terminals, and never during
run,startoragent, in JSON output, under CI, or forupdateitself. It delays a command by a second at most, and a network error never changes a command's result.Turn it off with
MUDROOM_NO_UPDATE_CHECK=1ormudroom update --auto-check off. The CLI inside the app also follows the app's setting.mudroom update(with--checkand--yes) does what fits how Mudroom was installed:brew upgrade --cask mudroom..sha256and GitHub's asset digest (and refuses if neither exists), then swaps the files in, with a rollback if anything fails.Docs
README sections on updating, on the exact request the check makes and how to turn it off, a FAQ entry, and the release steps. The site's "no telemetry" line now mentions the update check.
Release steps from now on
Sources/mudroom/Version.swift, tagvX, push the tag.scripts/appcast.sh X <sha256 from the workflow log>, commitdocs/appcast.xml, push to main.scripts/update-cask.sh X --remote, copy to the tap.scripts/update-windows-manifests.sh X, copy to the bucket and the winget fork.$v = 'X'.0.5.0 has no updater, so people on it need to update once by hand.
Testing
swift buildandswift test(325 tests) on macOS. The CLI still builds with Command Line Tools only.python3 -m http.server: on 0.5.99 (build 1000) I clicked Install, and it relaunched as 0.6.0 (build 1001) on disk. The bundled CLI reports 0.6.0 and the signature is valid. A wrong archive signature is refused ("The update is improperly signed"), and so is an edited feed ("The update feed is improperly signed").