Repository navigation
feat(updater): ship in-app updates from GitHub Releases - #8
Merged
Merged
Conversation
The DMG is handed out by link, so without a check on launch a user stays on whatever build they downloaded once. The HTTP request is made in Rust rather than the webview: the CSP allows no origin but 'self', and widening connect-src to reach GitHub would open that door for the whole UI. A declined version is remembered by version, not as a flag, so saying no to 0.2.0 still leaves 0.3.0 audible. Claude-Session: https://claude.ai/code/session_01NTrpqWnfR4k3BNVhAkeJe1
The archive is packed by bundle-dylibs.sh, not by tauri's own createUpdaterArtifacts: that one is produced inside `tauri build`, before a single dylib has been copied, so it would carry an app that still links ~/.local and /opt/homebrew — it installs cleanly and then dies in dyld on the user's machine. latest.json is written on `release: published` instead of alongside the DMG because it has to carry the release notes, and those are typed into the draft long after the tag build finished. A missing .sig fails the release outright rather than drafting one the updater could never use. Claude-Session: https://claude.ai/code/session_01NTrpqWnfR4k3BNVhAkeJe1
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.
Summary
Platter is handed out as a DMG link, so an installed copy stayed on whatever build it was downloaded as, forever. This adds a launch-time update check against GitHub Releases, a header badge that offers the new version, and the release plumbing that produces a signed archive and a
latest.jsonfeed for it.Changes
tauri-plugin-updater+tauri-plugin-process, wired inlib.rsand the default capability. The HTTP request is made in Rust, not the webview — the CSP allows no origin but'self', and wideningconnect-srcto reach GitHub would open that door for the whole UI.ui/lib/updates.ts— check, install with download progress, relaunch.checkForUpdatenever throws: the feed 404s for every build older than the first release carrying alatest.json, and an offline launch looks the same.ui/components/UpdateBadge.tsx— shows the available version beside the current one, with the notes and Install and restart. A declined version is remembered by version, not as a flag, so declining 0.2.0 still leaves 0.3.0 audible.bundle-dylibs.shpacks and signsPlatter.app.tar.gzitself, after re-signing. Tauri's owncreateUpdaterArtifactsstays off: it runs insidetauri build, before a single dylib has been copied, so its archive would carry an app that still links~/.localand/opt/homebrew— it installs cleanly and then dies in dyld on the user's machine, with no way back.build-dmg.ymltakes the signing key as a secret and uploads the DMG and the archive as one artifact, so a release can never ship an update that isn't the download.release.ymlfails outright when the.sigis missing, rather than drafting a release the updater could never use, and plants an<!-- update-notes-end -->marker in the body.updater-feed.yml(new) writeslatest.jsononrelease: published— it has to carry the release notes, and those are typed into the draft long after the tag build finished. Publishing the draft is therefore the switch that ships an update.Shipping updatesnotes in.claude/CLAUDE.md.Test plan
npm test— 128 pass, including the newupdates.test.ts.npx tsc --noEmit— clean.cargo check— clean.Note
The branch also carries
631c1c0(README rewrite), which is already inmainbut not indev, so it shows in this diff.