chore #14740: drop appimage and the unsupported feed url

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>
This commit is contained in:
hauke
2026-11-06 12:29:53 +01:00
co-authored by Claude Sonnet 5
parent 572c685396
commit eff07d2f59
5 changed files with 43 additions and 73 deletions
+31 -48
View File
@@ -3,7 +3,7 @@
A release consists of: A release consists of:
- the Windows NSIS installer (per-user, no admin rights), cross-built on Debian, - the Windows NSIS installer (per-user, no admin rights), cross-built on Debian,
- the Debian `.deb` and `.AppImage`, - the Debian `.deb`,
- an updater signature (`.sig`) for each of them, - an updater signature (`.sig`) for each of them,
- `latest.json`, the update feed the installed Windows apps read. - `latest.json`, the update feed the installed Windows apps read.
@@ -46,8 +46,7 @@ restarts the app. Debian builds do not update themselves.
`https://gitea.euvino.eu/public/call-recorder`. The download URLs in `latest.json` `https://gitea.euvino.eu/public/call-recorder`. The download URLs in `latest.json`
point to `${RELEASE_BASE_URL}/releases/download/v<version>/<file>`. point to `${RELEASE_BASE_URL}/releases/download/v<version>/<file>`.
- `UPDATE_JSON_URLS`: where the app looks for `latest.json`. `build-release.sh` - `UPDATE_JSON_URLS`: where the app looks for `latest.json`. `build-release.sh`
writes them, in this order, into `plugins.updater.endpoints` in writes them into `plugins.updater.endpoints` in `src-tauri/tauri.conf.json`.
`src-tauri/tauri.conf.json`.
Do not edit the endpoints in `tauri.conf.json` by hand. Change `release.env`; the Do not edit the endpoints in `tauri.conf.json` by hand. Change `release.env`; the
next release build writes them into `tauri.conf.json`. next release build writes them into `tauri.conf.json`.
@@ -55,43 +54,25 @@ next release build writes them into `tauri.conf.json`.
The repository and its releases must be readable without logging in: the app The repository and its releases must be readable without logging in: the app
downloads anonymously. downloads anonymously.
### The two feed URLs ### The feed URL
The app tries the endpoints in order and uses the first one that returns a release. Verified on Gitea 1.27.3: `releases/latest/download/<file>` does **not** redirect
A `404` or a network error on one moves on to the next one: to a release's assets, even for the newest non-draft, non-prerelease release —
requesting it returns `404`. So the feed lives only at
1. `https://gitea.euvino.eu/public/call-recorder/releases/latest/download/latest.json`: ```
`latest.json` as an asset of the newest release (not a draft, not a pre-release). https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json
This works only if Gitea redirects `releases/latest/download/<file>` to the newest
release.
2. `https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json`:
`latest.json` committed to the root of `master`.
Each release serves both:
- uploading the release assets covers URL 1 (step 7 below);
- committing `latest.json` to the root of `master` covers 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:
```sh
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: `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.
- **URL 1 works:** a later version may drop URL 2 from `UPDATE_JSON_URLS`. Every Versions 0.1.0 and 0.1.1 were built with both URLs compiled in (the endpoints
installed version also asks URL 1, so step 8 is no longer needed. are fixed at build time; installed apps keep asking the URLs they were built
- **Only URL 2 works:** a later version may drop URL 1. Step 8 (committing with). They still try `releases/latest/download/latest.json` first on every
`latest.json`) stays part of every release. check; that is harmless — it 404s and the app falls through to the
`raw/branch/master` URL, which answers normally.
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 ## Releasing a version
@@ -120,8 +101,8 @@ e.g. for the first release `0.1.0`.
- sets the version in `src-tauri/tauri.conf.json`, `src-tauri/Cargo.toml` and - sets the version in `src-tauri/tauri.conf.json`, `src-tauri/Cargo.toml` and
`ui/package.json` (the build updates `Cargo.lock` too), and writes the endpoints `ui/package.json` (the build updates `Cargo.lock` too), and writes the endpoints
from `release.env` into `tauri.conf.json`, from `release.env` into `tauri.conf.json`,
- builds the Windows installer (`scripts/build-windows.sh`), the `.deb` and the - builds the Windows installer (`scripts/build-windows.sh`) and the `.deb`, each
`.AppImage`, each with its `.sig`, with its `.sig`,
- copies them to `dist-release/0.1.1/` under ASCII names (`Gespraechsrekorder_…`) - copies them to `dist-release/0.1.1/` under ASCII names (`Gespraechsrekorder_…`)
and writes `latest.json` with `scripts/make-latest-json.sh`. and writes `latest.json` with `scripts/make-latest-json.sh`.
@@ -134,7 +115,6 @@ e.g. for the first release `0.1.0`.
|------------------------------------------------------|--------------------------------------| |------------------------------------------------------|--------------------------------------|
| `Gespraechsrekorder_0.1.1_x64-setup.exe` (+ `.sig`) | Windows installer and update package | | `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.deb` (+ `.sig`) | Debian package |
| `Gespraechsrekorder_0.1.1_amd64.AppImage` (+ `.sig`) | Debian AppImage |
| `latest.json` | Update feed | | `latest.json` | Update feed |
4. Commit the version bump the script left in the working tree: 4. Commit the version bump the script left in the working tree:
@@ -155,12 +135,14 @@ e.g. for the first release `0.1.0`.
<https://gitea.euvino.eu/public/call-recorder/releases/new>. Do not mark it as a <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. draft or a pre-release, otherwise it is not the "latest" release.
7. Upload every file from `dist-release/0.1.1/` as a release asset, keeping the file 7. Upload the installer, the `.deb` and their `.sig` files from
names (`latest.json` points to them). Upload the installers, packages and `.sig` `dist-release/0.1.1/` as release assets, keeping the file names (`latest.json`
files first and **`latest.json` last**. As soon as `latest.json` is visible, points to them). `latest.json` itself does not need to be uploaded as a release
installed apps may try to download the files it lists. asset: the feed is served from the committed file (step 8), not from
`releases/latest/download/latest.json` (see "The feed URL" above).
8. Only after all assets are uploaded, publish the feed for URL 2 as well: 8. Only after all assets from step 7 are uploaded and downloadable (their URLs are
what the feed will point to), commit the feed:
```sh ```sh
cp dist-release/0.1.1/latest.json latest.json cp dist-release/0.1.1/latest.json latest.json
@@ -169,15 +151,16 @@ e.g. for the first release `0.1.0`.
git push origin master git push origin master
``` ```
Committing `latest.json` is mandatory for every release — it is the only
place the feed lives.
9. Check the feed: 9. Check the feed:
```sh ```sh
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 . 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 `url` entries must It must show the new version, and the `url` entry must download.
download.
## Checking an update on Windows 11 ## Checking an update on Windows 11
@@ -211,5 +194,5 @@ and 30 minutes, then every 6 hours. The log
- `RELEASE_ALLOW_KEY_MISMATCH=1` lets `build-release.sh` build with a key that does - `RELEASE_ALLOW_KEY_MISMATCH=1` lets `build-release.sh` build with a key that does
not match `plugins.updater.pubkey`. Use it only to test the pipeline with a throwaway not match `plugins.updater.pubkey`. Use it only to test the pipeline with a throwaway
key. Installed apps reject such a release, so never publish it. key. Installed apps reject such a release, so never publish it.
- `latest.json` also lists the AppImage (`linux-x86_64`). The Debian builds do not - `latest.json` only lists `windows-x86_64`. Debian installs from the `.deb` and
check for updates yet. does not self-update, so Linux has no entry in the feed.
+2 -3
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Builds a signed release of Gesprächsrekorder into dist-release/<version>/: # Builds a signed release of Gesprächsrekorder into dist-release/<version>/:
# the Windows NSIS installer (cross-built via build-windows.sh), the Linux # the Windows NSIS installer (cross-built via build-windows.sh), the Linux
# deb and AppImage, their updater signatures (.sig) and latest.json. # deb, their updater signatures (.sig) and latest.json.
# Sets <version> in tauri.conf.json, src-tauri/Cargo.toml and # Sets <version> in tauri.conf.json, src-tauri/Cargo.toml and
# ui/package.json and leaves those changes for you to commit. Never tags or # ui/package.json and leaves those changes for you to commit. Never tags or
# publishes anything; see RELEASING.md. # publishes anything; see RELEASING.md.
@@ -157,7 +157,7 @@ grep -qx "version = \"${VERSION}\"" "${CARGO_TOML}" || die "could not set the ve
# --- Build ------------------------------------------------------------------ # --- Build ------------------------------------------------------------------
"${SCRIPT_DIR}/build-windows.sh" "${SCRIPT_DIR}/build-windows.sh"
(cd "${REPO_ROOT}" && cargo tauri build --bundles deb appimage) (cd "${REPO_ROOT}" && cargo tauri build --bundles deb)
# --- Collect ---------------------------------------------------------------- # --- Collect ----------------------------------------------------------------
OUT="${REPO_ROOT}/dist-release/${VERSION}" OUT="${REPO_ROOT}/dist-release/${VERSION}"
@@ -183,7 +183,6 @@ collect() {
} }
collect "${WINDOWS_BUNDLE}" "*_${VERSION}_x64-setup.exe" collect "${WINDOWS_BUNDLE}" "*_${VERSION}_x64-setup.exe"
collect "${LINUX_BUNDLE}/deb" "*_${VERSION}_amd64.deb" collect "${LINUX_BUNDLE}/deb" "*_${VERSION}_amd64.deb"
collect "${LINUX_BUNDLE}/appimage" "*_${VERSION}_amd64.AppImage"
"${SCRIPT_DIR}/make-latest-json.sh" "${VERSION}" "${OUT}" "${SCRIPT_DIR}/make-latest-json.sh" "${VERSION}" "${OUT}"
jq -e . "${OUT}/latest.json" >/dev/null || die "latest.json is not valid JSON" jq -e . "${OUT}/latest.json" >/dev/null || die "latest.json is not valid JSON"
+2 -8
View File
@@ -2,7 +2,8 @@
# Writes <dir>/latest.json, the update feed the app reads, from the signed # Writes <dir>/latest.json, the update feed the app reads, from the signed
# release artifacts in <dir>: # release artifacts in <dir>:
# windows-x86_64 -> *_<version>_x64-setup.exe (+ .sig) # windows-x86_64 -> *_<version>_x64-setup.exe (+ .sig)
# linux-x86_64 -> *_<version>_amd64.AppImage (+ .sig) # Debian builds do not self-update, so the .deb is not listed here (it is
# still a release asset, just not part of the feed).
# The download URLs point at ${RELEASE_BASE_URL}/releases/download/v<version>/ # The download URLs point at ${RELEASE_BASE_URL}/releases/download/v<version>/
# (scripts/release.env). # (scripts/release.env).
# #
@@ -38,7 +39,6 @@ signed_file() {
} }
WINDOWS="$(signed_file "*_${VERSION}_x64-setup.exe")" WINDOWS="$(signed_file "*_${VERSION}_x64-setup.exe")"
LINUX="$(signed_file "*_${VERSION}_amd64.AppImage")"
jq -n \ jq -n \
--arg version "${VERSION}" \ --arg version "${VERSION}" \
@@ -46,8 +46,6 @@ jq -n \
--arg base "${RELEASE_BASE_URL}/releases/download/v${VERSION}" \ --arg base "${RELEASE_BASE_URL}/releases/download/v${VERSION}" \
--arg windows_file "$(basename "${WINDOWS}")" \ --arg windows_file "$(basename "${WINDOWS}")" \
--rawfile windows_sig "${WINDOWS}.sig" \ --rawfile windows_sig "${WINDOWS}.sig" \
--arg linux_file "$(basename "${LINUX}")" \
--rawfile linux_sig "${LINUX}.sig" \
'{ '{
version: $version, version: $version,
pub_date: $pub_date, pub_date: $pub_date,
@@ -55,10 +53,6 @@ jq -n \
"windows-x86_64": { "windows-x86_64": {
signature: ($windows_sig | gsub("\\s"; "")), signature: ($windows_sig | gsub("\\s"; "")),
url: "\($base)/\($windows_file | @uri)" url: "\($base)/\($windows_file | @uri)"
},
"linux-x86_64": {
signature: ($linux_sig | gsub("\\s"; "")),
url: "\($base)/\($linux_file | @uri)"
} }
} }
}' >"${DIR}/latest.json" }' >"${DIR}/latest.json"
+3 -7
View File
@@ -6,13 +6,9 @@
RELEASE_BASE_URL="https://gitea.euvino.eu/public/call-recorder" RELEASE_BASE_URL="https://gitea.euvino.eu/public/call-recorder"
# Where the app looks for latest.json, tried in this order until one answers # Where the app looks for latest.json: committed to the root of master.
# with a release: # Gitea 1.27.3 does not redirect releases/latest/download/<file> to a
# 1. latest.json as an asset of the newest release, # release's assets, so that URL is not offered here. See RELEASING.md.
# 2. latest.json committed to the root of master.
# Once it is clear which one Gitea serves, the other can be dropped here (it
# then disappears from the next version built).
UPDATE_JSON_URLS=( UPDATE_JSON_URLS=(
"${RELEASE_BASE_URL}/releases/latest/download/latest.json"
"${RELEASE_BASE_URL}/raw/branch/master/latest.json" "${RELEASE_BASE_URL}/raw/branch/master/latest.json"
) )
+1 -3
View File
@@ -51,8 +51,7 @@
"active": true, "active": true,
"targets": [ "targets": [
"nsis", "nsis",
"deb", "deb"
"appimage"
], ],
"icon": [ "icon": [
"icons/32x32.png", "icons/32x32.png",
@@ -72,7 +71,6 @@
"updater": { "updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIwM0EzNUEyMTUwOThERUQKUldUdGpRa1ZvalU2SVBtYVZRaWlWMVBCNzFTd1BRbmtmdU9sZXMrVTltckNiYlRSSmZHcWpNMHUK", "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIwM0EzNUEyMTUwOThERUQKUldUdGpRa1ZvalU2SVBtYVZRaWlWMVBCNzFTd1BRbmtmdU9sZXMrVTltckNiYlRSSmZHcWpNMHUK",
"endpoints": [ "endpoints": [
"https://gitea.euvino.eu/public/call-recorder/releases/latest/download/latest.json",
"https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json" "https://gitea.euvino.eu/public/call-recorder/raw/branch/master/latest.json"
], ],
"windows": { "windows": {