Skip to content

Let an installed copy update itself - #4

Merged
thorstenalpers merged 1 commit into
mainfrom
feat/updater-on-main
Aug 17, 2026
Merged

Let an installed copy update itself#4
thorstenalpers merged 1 commit into
mainfrom
feat/updater-on-main

Conversation

@thorstenalpers

Copy link
Copy Markdown
Owner

Replaces #3, which was merged into fix/cookie-and-release instead of main. My mistake: I said GitHub would retarget a stacked PR once its base merged, and it only does that when the base branch is deleted on merge. It was not, so the updater landed on a branch nobody reads. Same commit, replayed onto main.

#2 builds an installer nobody would ever be told about. This is 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 running binary.
  • The release run signs the installer and writes latest.json beside it, which is the file every installed copy polls.

Before the first release, and only you can do it — it is your private key:

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

The key was generated locally, never passed through the repository, the logs or any diff. Only the public half is in tauri.conf.json, where it belongs.

Without the 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. Deliberate — an unsigned build is refused by the updater in every installed copy.

Verified on this branch: lint, svelte-check over 998 files, 303 tests, the front-end build, cargo fmt --check, clippy -D warnings and the host tests. The updater path 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 eb8b133 into main Aug 17, 2026
2 checks passed
@thorstenalpers
thorstenalpers deleted the feat/updater-on-main branch August 17, 2026 19:50
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