Verified on Gitea 1.27.3: releases/latest/download/<file> does not redirect to a release's assets (404), so that update-feed endpoint is dead. Only raw/branch/master/latest.json works; keep that one in release.env and tauri.conf.json and document it as the mandatory feed in RELEASING.md. Also drop the AppImage (user: it is huge and we don't need it): bundle targets become nsis+deb, build-release.sh only builds the .deb on Linux, and make-latest-json.sh no longer writes a Linux platform entry at all (Debian builds don't self-update). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
8.6 KiB
Releasing Gesprächsrekorder
A release consists of:
- the Windows NSIS installer (per-user, no admin rights), cross-built on Debian,
- the Debian
.deb, - an updater signature (
.sig) for each of them, latest.json, the update feed the installed Windows apps read.
scripts/build-release.sh builds all of this locally into dist-release/<version>/
(gitignored). It never tags, pushes or publishes anything: tagging and creating the
Gitea release are manual steps (below).
Installed Windows apps check the feed at startup and every 6 hours. If a newer version exists, the main window shows "Update verfügbar (vX.Y.Z) → Installieren & neu starten". Installing is only possible while no recording runs and no call is being processed. The installer then runs in passive mode (progress bar only) and restarts the app. Debian builds do not update themselves.
One-time setup
-
Generate the updater key pair (once, never again):
cargo tauri signer generate -w ~/.tauri/call-recorder.keyPick a password. Keep
~/.tauri/call-recorder.keyand its password safe (e.g. in the password manager) and never commit it (the repository is public). If the key is lost, the installed apps cannot be updated anymore: every user would have to install a new version by hand. -
Public key: it is already in
src-tauri/tauri.conf.jsonunderplugins.updater.pubkey(key id203A35A215098DED). Change it only if you rotate the key. -
Tools on the Debian build machine: the rustup toolchain with the
x86_64-pc-windows-msvctarget,cargo-xwin,makensis(NSIS),tauri-cli2 (cargo tauri),pnpm,jq.
Where releases live: scripts/release.env
scripts/release.env is the single source of truth for the release URLs:
RELEASE_BASE_URL: the Gitea repository,https://gitea.euvino.eu/public/call-recorder. The download URLs inlatest.jsonpoint to${RELEASE_BASE_URL}/releases/download/v<version>/<file>.UPDATE_JSON_URLS: where the app looks forlatest.json.build-release.shwrites them intoplugins.updater.endpointsinsrc-tauri/tauri.conf.json.
Do not edit the endpoints in tauri.conf.json by hand. Change release.env; the
next release build writes them into tauri.conf.json.
The repository and its releases must be readable without logging in: the app downloads anonymously.
The feed URL
Verified on Gitea 1.27.3: releases/latest/download/<file> does not redirect
to a release's assets, even for the newest non-draft, non-prerelease release —
requesting it returns 404. So the feed lives only at
https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json
latest.json committed to the root of master. This makes committing
latest.json after every release mandatory, not optional (step 8 below) —
there is no redirect to fall back on.
Versions 0.1.0 and 0.1.1 were built with both URLs compiled in (the endpoints
are fixed at build time; installed apps keep asking the URLs they were built
with). They still try releases/latest/download/latest.json first on every
check; that is harmless — it 404s and the app falls through to the
raw/branch/master URL, which answers normally.
Releasing a version
Example: version 0.1.1. Versions are semantic versions and must be greater than the
installed one. The script refuses a version that is not greater than the committed
one. The committed version itself is allowed while there is no tag v<version> yet,
e.g. for the first release 0.1.0.
-
Start from
masterwith no uncommitted changes to tracked files (the script refuses otherwise; untracked files do not matter) and the tests passing (cargo test --workspace). If a build failed after the script had set the version, reset that first:git checkout src-tauri/tauri.conf.json src-tauri/Cargo.toml Cargo.lock ui/package.json. -
Build (works in fish and bash; without
TAURI_SIGNING_PRIVATE_KEY_PASSWORDthe script asks for the password):env TAURI_SIGNING_PRIVATE_KEY_PATH=$HOME/.tauri/call-recorder.key scripts/build-release.sh 0.1.1The script:
- checks that the tree is clean and the version is greater (see above),
- checks the key and password by signing a probe file, and stops if the key does
not belong to
plugins.updater.pubkey, - sets the version in
src-tauri/tauri.conf.json,src-tauri/Cargo.tomlandui/package.json(the build updatesCargo.locktoo), and writes the endpoints fromrelease.envintotauri.conf.json, - builds the Windows installer (
scripts/build-windows.sh) and the.deb, each with its.sig, - copies them to
dist-release/0.1.1/under ASCII names (Gespraechsrekorder_…) and writeslatest.jsonwithscripts/make-latest-json.sh.
TAURI_SIGNING_PRIVATE_KEY(the key itself or a path) works instead ofTAURI_SIGNING_PRIVATE_KEY_PATH. -
Check
dist-release/0.1.1/. It should contain:File Purpose Gespraechsrekorder_0.1.1_x64-setup.exe(+.sig)Windows installer and update package Gespraechsrekorder_0.1.1_amd64.deb(+.sig)Debian package latest.jsonUpdate feed -
Commit the version bump the script left in the working tree:
git add src-tauri/tauri.conf.json src-tauri/Cargo.toml Cargo.lock ui/package.json git commit -m "chore #<wp>: release 0.1.1" -
Tag and push:
git tag v0.1.1 git push origin master v0.1.1 -
Create the release
v0.1.1for the tag on https://gitea.euvino.eu/public/call-recorder/releases/new. Do not mark it as a draft or a pre-release, otherwise it is not the "latest" release. -
Upload the installer, the
.deband their.sigfiles fromdist-release/0.1.1/as release assets, keeping the file names (latest.jsonpoints to them).latest.jsonitself does not need to be uploaded as a release asset: the feed is served from the committed file (step 8), not fromreleases/latest/download/latest.json(see "The feed URL" above). -
Only after all assets from step 7 are uploaded and downloadable (their URLs are what the feed will point to), commit the feed:
cp dist-release/0.1.1/latest.json latest.json git add latest.json git commit -m "chore #<wp>: update feed 0.1.1" git push origin masterCommitting
latest.jsonis mandatory for every release — it is the only place the feed lives. -
Check the feed:
curl -sL https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json | jq .It must show the new version, and the
urlentry must download.
Checking an update on Windows 11
After publishing 0.1.0 and then 0.1.1:
- Install 0.1.0 as a normal user and start it.
- Within a few seconds the main window shows "Update verfügbar (v0.1.1) → Installieren & neu starten".
- Start a manual recording: the button is disabled and the banner says "Nach der laufenden Aufnahme/Verarbeitung möglich". Stop the recording and discard it: the button is enabled again.
- Click it: the banner shows the download progress. Then the installer shows only a progress bar, asks for no admin rights, and the app restarts as 0.1.1. The banner is gone.
The app also shows its main window on the first start of a new version, even if it
was started with --autostart (the installer restarts it with its old arguments).
Failed checks (offline, no release yet) are not shown. They are retried after 1, 5
and 30 minutes, then every 6 hours. The log
(%LOCALAPPDATA%\eu.euvino.callrecorder\logs) has an Info line update check failed: ….
Notes
scripts/build-windows.shalone builds an unsigned test installer without updater artifacts when no signing key is set.RELEASE_ALLOW_DIRTY=1letsbuild-release.shbuild with uncommitted changes to tracked files, andRELEASE_ALLOW_NOT_NEWER=1lets it build a version that is not greater than the committed one. Use them only for test builds; never publish one.RELEASE_ALLOW_KEY_MISMATCH=1letsbuild-release.shbuild with a key that does not matchplugins.updater.pubkey. Use it only to test the pipeline with a throwaway key. Installed apps reject such a release, so never publish it.latest.jsononly listswindows-x86_64. Debian installs from the.deband does not self-update, so Linux has no entry in the feed.