Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8.2 KiB
Releasing Gesprächsrekorder
A release consists of:
- the Windows NSIS installer (per-user, no admin rights), cross-built on Debian,
- the Debian
.deband.AppImage, - 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, in this order, 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 two feed URLs
The app tries the endpoints in order and uses the first one that returns a release.
A 404 or a network error on one moves on to the next one:
https://gitea.euvino.eu/public/call-recorder/releases/latest/download/latest.json:latest.jsonas an asset of the newest release (not a draft, not a pre-release). This works only if Gitea redirectsreleases/latest/download/<file>to the newest release.https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json:latest.jsoncommitted to the root ofmaster.
Each release serves both:
- uploading the release assets covers URL 1 (step 7 below);
- committing
latest.jsonto the root ofmastercovers URL 2 (step 8 below).
The endpoints are compiled into the app. Installed versions keep asking the URLs they were built with, which is why both are configured from the start.
After the first release, check which URL works:
curl -sIL https://gitea.euvino.eu/public/call-recorder/releases/latest/download/latest.json
curl -sIL https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json
The final status of a working URL is 200. Then:
- URL 1 works: a later version may drop URL 2 from
UPDATE_JSON_URLS. Every installed version also asks URL 1, so step 8 is no longer needed. - Only URL 2 works: a later version may drop URL 1. Step 8 (committing
latest.json) stays part of every release.
Caveat: if URL 1 answered 200 with something that is not JSON (e.g. an HTML page),
the updater would stop there instead of trying URL 2. Gitea answers a missing file
with 404, which falls through as intended.
Releasing a version
Example: version 0.1.1. Versions are semantic versions and must be higher than the
installed one.
-
Start from a clean
masterwith the tests passing (cargo test --workspace). -
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 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), the.deband the.AppImage, 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. - checks the key and password by signing a probe file, and stops if the key does
not belong to
-
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 Gespraechsrekorder_0.1.1_amd64.AppImage(+.sig)Debian AppImage 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 every file from
dist-release/0.1.1/as a release asset, including the.sigfiles andlatest.json. Keep the file names:latest.jsonpoints to them. -
Once the assets are uploaded, publish the feed for URL 2 as well:
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 master -
Check the feed:
curl -sL https://gitea.euvino.eu/public/call-recorder/releases/latest/download/latest.json | jq . curl -sL https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json | jq .The URL(s) that work must show the new version, and the
urlentries 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.
Failed checks (offline, no release yet) are not shown. 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_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.jsonalso lists the AppImage (linux-x86_64). The Debian builds do not check for updates yet.