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:
+31
-48
@@ -3,7 +3,7 @@
|
||||
A release consists of:
|
||||
|
||||
- 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,
|
||||
- `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`
|
||||
point to `${RELEASE_BASE_URL}/releases/download/v<version>/<file>`.
|
||||
- `UPDATE_JSON_URLS`: where the app looks for `latest.json`. `build-release.sh`
|
||||
writes them, in this order, into `plugins.updater.endpoints` in
|
||||
`src-tauri/tauri.conf.json`.
|
||||
writes them into `plugins.updater.endpoints` in `src-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`.
|
||||
@@ -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
|
||||
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.
|
||||
A `404` or a network error on one moves on to the next one:
|
||||
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
|
||||
|
||||
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).
|
||||
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
|
||||
```
|
||||
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
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -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
|
||||
`ui/package.json` (the build updates `Cargo.lock` too), and writes the endpoints
|
||||
from `release.env` into `tauri.conf.json`,
|
||||
- builds the Windows installer (`scripts/build-windows.sh`), the `.deb` and the
|
||||
`.AppImage`, each with its `.sig`,
|
||||
- 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 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_amd64.deb` (+ `.sig`) | Debian package |
|
||||
| `Gespraechsrekorder_0.1.1_amd64.AppImage` (+ `.sig`) | Debian AppImage |
|
||||
| `latest.json` | Update feed |
|
||||
|
||||
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
|
||||
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
|
||||
names (`latest.json` points to them). Upload the installers, packages and `.sig`
|
||||
files first and **`latest.json` last**. As soon as `latest.json` is visible,
|
||||
installed apps may try to download the files it lists.
|
||||
7. Upload the installer, the `.deb` and their `.sig` files from
|
||||
`dist-release/0.1.1/` as release assets, keeping the file names (`latest.json`
|
||||
points to them). `latest.json` itself does not need to be uploaded as a release
|
||||
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
|
||||
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
|
||||
```
|
||||
|
||||
Committing `latest.json` is mandatory for every release — it is the only
|
||||
place the feed lives.
|
||||
|
||||
9. Check the feed:
|
||||
|
||||
```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 .
|
||||
```
|
||||
|
||||
The URL(s) that work must show the new version, and the `url` entries must
|
||||
download.
|
||||
It must show the new version, and the `url` entry must download.
|
||||
|
||||
## 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
|
||||
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.
|
||||
- `latest.json` also lists the AppImage (`linux-x86_64`). The Debian builds do not
|
||||
check for updates yet.
|
||||
- `latest.json` only lists `windows-x86_64`. Debian installs from the `.deb` and
|
||||
does not self-update, so Linux has no entry in the feed.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds a signed release of Gesprächsrekorder into dist-release/<version>/:
|
||||
# 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
|
||||
# ui/package.json and leaves those changes for you to commit. Never tags or
|
||||
# publishes anything; see RELEASING.md.
|
||||
@@ -157,7 +157,7 @@ grep -qx "version = \"${VERSION}\"" "${CARGO_TOML}" || die "could not set the ve
|
||||
|
||||
# --- Build ------------------------------------------------------------------
|
||||
"${SCRIPT_DIR}/build-windows.sh"
|
||||
(cd "${REPO_ROOT}" && cargo tauri build --bundles deb appimage)
|
||||
(cd "${REPO_ROOT}" && cargo tauri build --bundles deb)
|
||||
|
||||
# --- Collect ----------------------------------------------------------------
|
||||
OUT="${REPO_ROOT}/dist-release/${VERSION}"
|
||||
@@ -183,7 +183,6 @@ collect() {
|
||||
}
|
||||
collect "${WINDOWS_BUNDLE}" "*_${VERSION}_x64-setup.exe"
|
||||
collect "${LINUX_BUNDLE}/deb" "*_${VERSION}_amd64.deb"
|
||||
collect "${LINUX_BUNDLE}/appimage" "*_${VERSION}_amd64.AppImage"
|
||||
|
||||
"${SCRIPT_DIR}/make-latest-json.sh" "${VERSION}" "${OUT}"
|
||||
jq -e . "${OUT}/latest.json" >/dev/null || die "latest.json is not valid JSON"
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Writes <dir>/latest.json, the update feed the app reads, from the signed
|
||||
# release artifacts in <dir>:
|
||||
# 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>/
|
||||
# (scripts/release.env).
|
||||
#
|
||||
@@ -38,7 +39,6 @@ signed_file() {
|
||||
}
|
||||
|
||||
WINDOWS="$(signed_file "*_${VERSION}_x64-setup.exe")"
|
||||
LINUX="$(signed_file "*_${VERSION}_amd64.AppImage")"
|
||||
|
||||
jq -n \
|
||||
--arg version "${VERSION}" \
|
||||
@@ -46,8 +46,6 @@ jq -n \
|
||||
--arg base "${RELEASE_BASE_URL}/releases/download/v${VERSION}" \
|
||||
--arg windows_file "$(basename "${WINDOWS}")" \
|
||||
--rawfile windows_sig "${WINDOWS}.sig" \
|
||||
--arg linux_file "$(basename "${LINUX}")" \
|
||||
--rawfile linux_sig "${LINUX}.sig" \
|
||||
'{
|
||||
version: $version,
|
||||
pub_date: $pub_date,
|
||||
@@ -55,10 +53,6 @@ jq -n \
|
||||
"windows-x86_64": {
|
||||
signature: ($windows_sig | gsub("\\s"; "")),
|
||||
url: "\($base)/\($windows_file | @uri)"
|
||||
},
|
||||
"linux-x86_64": {
|
||||
signature: ($linux_sig | gsub("\\s"; "")),
|
||||
url: "\($base)/\($linux_file | @uri)"
|
||||
}
|
||||
}
|
||||
}' >"${DIR}/latest.json"
|
||||
|
||||
+3
-7
@@ -6,13 +6,9 @@
|
||||
|
||||
RELEASE_BASE_URL="https://gitea.euvino.eu/public/call-recorder"
|
||||
|
||||
# Where the app looks for latest.json, tried in this order until one answers
|
||||
# with a release:
|
||||
# 1. latest.json as an asset of the newest release,
|
||||
# 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).
|
||||
# Where the app looks for latest.json: committed to the root of master.
|
||||
# Gitea 1.27.3 does not redirect releases/latest/download/<file> to a
|
||||
# release's assets, so that URL is not offered here. See RELEASING.md.
|
||||
UPDATE_JSON_URLS=(
|
||||
"${RELEASE_BASE_URL}/releases/latest/download/latest.json"
|
||||
"${RELEASE_BASE_URL}/raw/branch/master/latest.json"
|
||||
)
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
"active": true,
|
||||
"targets": [
|
||||
"nsis",
|
||||
"deb",
|
||||
"appimage"
|
||||
"deb"
|
||||
],
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
@@ -72,7 +71,6 @@
|
||||
"updater": {
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIwM0EzNUEyMTUwOThERUQKUldUdGpRa1ZvalU2SVBtYVZRaWlWMVBCNzFTd1BRbmtmdU9sZXMrVTltckNiYlRSSmZHcWpNMHUK",
|
||||
"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"
|
||||
],
|
||||
"windows": {
|
||||
|
||||
Reference in New Issue
Block a user