Repository navigation
Conversation
- Once a day (first check about 2 minutes after start) the PC app reads latest.json from the latest GitHub release. A newer version is downloaded in the background and kept only if its signature checks out against the public key in tauri.conf.json and was made for that exact version; never a downgrade. Then a banner "UPDATE READY - Tugboat X.Y.Z" and a tray item offer Install, which runs the installer in passive mode (Windows asks for admin rights; saying no changes nothing) and shows the window again afterwards. - Settings: "Check for updates", on by default, stored on the PC only. Switching it off stops a check or download in progress. Nothing about the user or their files is sent; a QA profile never checks. - Also checks soon after another device refuses this PC as too old, at most once an hour. Network errors, a 404 and a bad signature are logged once and retried at the next daily check. - TLS through the Windows certificate store, so it works behind a proxy that re-signs HTTPS as well as on a plain network. - Release workflow: the installer is built without the signing key; a separate tag-only step signs it (bound to the version), and a script writes latest.json only after verifying that signature against the app's public key and the installer bytes. Tags with a suffix become pre-releases, so they are never offered as an update. The run fails while the public key is the placeholder or a secret is missing. - Until the update key is made, tauri.conf.json holds the placeholder UPDATER_PUBKEY_MISSING and the app never checks.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
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.
The Windows app checks GitHub once a day and installs a newer version itself. Stacked on #6.
What changes
latest.jsonfrom the latest GitHub release (releases/latest/download/latest.json). The last check time is saved, so restarts do not check more often.tauri.conf.jsonand was made for that exact version. Never a downgrade.--app-version, and.github/scripts/latest-json.tswriteslatest.jsononly after verifying that signature against the app's public key and the installer bytes, so a key pair that does not match fails the release instead of every installed PC. Tags with a suffix (v1.1.0-rc.1) become pre-releases and are never offered. The run fails while the public key is the placeholder or a secret is missing.Before the first release
bun run tauri signer generate -w <path outside the repo>(password typed at the prompt). Losing the key or its password means installed PCs can never auto-update again.TAURI_SIGNING_PRIVATE_KEYandTAURI_SIGNING_PRIVATE_KEY_PASSWORD.plugins.updater.pubkeyintauri.conf.json(today the placeholderUPDATER_PUBKEY_MISSING, with which the app never checks).Tested
cargo test --workspace: 710 passed, 0 failed (4 ignored; the new one needs the internet) (schedule, persisted times, switch off, QA profile, refusal rate limit, version gate, placeholder key, release builds ignore the test overrides, show-after-update rule).cargo clippy -D warnings: clean.bun run check: svelte-check 0/0, 239 TS tests, 256 desktop Rust tests.bun test ./.github/scripts: 16 passed (latest.json: wrong key, other bytes, forged signature, altered comment, wrong version, placeholder key; workflow: secrets only in the sign step, tag-only steps, pre-release tags). Checked with realtauri signer signsignatures from two keys: the matching key passes, the other fails.Not tested yet (needs a person)