Skip to content

Let an installed copy update itself - #3

Merged
thorstenalpers merged 1 commit into
fix/cookie-and-releasefrom
feat/updater
Aug 17, 2026
Merged

Let an installed copy update itself#3
thorstenalpers merged 1 commit into
fix/cookie-and-releasefrom
feat/updater

Conversation

@thorstenalpers

Copy link
Copy Markdown
Owner

Stacked on #2 — GitHub will retarget this to main once that merges.

#2 builds an installer nobody would ever be told about. This adds the other half.

  • The app asks once at start whether a newer version is published, and the Info page grows a card offering to fetch it. Once, not on a timer: something opened to pick a colour has no business interrupting twice an hour, and the answer does not change while it is open. The download waits for a click, because it replaces the binary that is running.
  • The release run now signs the installer and writes latest.json beside it — the file every installed copy polls.

One thing to do before the first release, and only you can do it: the private key exists at ~/.tauri/openthemegenerator.key but the workflow reads it from a secret. Set it with

gh secret set TAURI_SIGNING_PRIVATE_KEY < $HOME/.tauri/openthemegenerator.key

The key was generated locally and never passed through the repository, the logs or this diff — only the public half is in tauri.conf.json, which is where it belongs.

Without that secret the release job fails loudly rather than shipping quietly: with a pubkey configured and no private key, tauri build writes the installer and then exits non-zero. That is deliberate — an unsigned build would be refused by the updater in every installed copy.

Verified locally: lint, svelte-check over 998 files, 303 tests, the front-end build, cargo clippy -D warnings and the host tests all clean. The updater itself cannot be exercised until a signed release exists to update from.

The release pipeline built an installer nobody would ever be told about.
This adds the other half: the app asks once at start whether a newer
version is published, and the Info page grows a card offering to fetch it.

Once at start, and never on a timer. Something opened to pick a colour has
no business interrupting twice an hour, and the answer does not change
while it is open. The download waits for a click, because it replaces the
binary that is running.

The release run now signs the installer and writes latest.json beside it —
the file every installed copy polls. With a pubkey in the config and no
private key, `tauri build` writes the installer and *then* exits non-zero,
so a release missing the secret fails the job rather than shipping
something the updater will refuse.

Only the public key is in this commit. The private one was generated to
~/.tauri/openthemegenerator.key and never passed through the repository,
the logs or this diff.
@thorstenalpers
thorstenalpers merged commit 5da9803 into fix/cookie-and-release Aug 17, 2026
2 checks passed
@thorstenalpers
thorstenalpers deleted the feat/updater branch August 17, 2026 19:14
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.

1 participant