fix #14740: faster update retries and release safety checks
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+23
-7
@@ -95,10 +95,16 @@ 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.
|
||||
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`.
|
||||
|
||||
1. Start from a clean `master` with the tests passing (`cargo test --workspace`).
|
||||
1. Start from `master` with 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`.
|
||||
|
||||
2. Build (works in fish and bash; without `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` the
|
||||
script asks for the password):
|
||||
@@ -108,6 +114,7 @@ installed one.
|
||||
```
|
||||
|
||||
The 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.toml` and
|
||||
@@ -148,10 +155,12 @@ installed one.
|
||||
<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, including the
|
||||
`.sig` files and `latest.json`. Keep the file names: `latest.json` points to them.
|
||||
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.
|
||||
|
||||
8. Once the assets are uploaded, publish the feed for URL 2 as well:
|
||||
8. Only after all assets are uploaded, publish the feed for URL 2 as well:
|
||||
|
||||
```sh
|
||||
cp dist-release/0.1.1/latest.json latest.json
|
||||
@@ -184,7 +193,11 @@ After publishing 0.1.0 and then 0.1.1:
|
||||
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
|
||||
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:
|
||||
…`.
|
||||
|
||||
@@ -192,6 +205,9 @@ Failed checks (offline, no release yet) are not shown. The log
|
||||
|
||||
- `scripts/build-windows.sh` alone builds an unsigned test installer without updater
|
||||
artifacts when no signing key is set.
|
||||
- `RELEASE_ALLOW_DIRTY=1` lets `build-release.sh` build with uncommitted changes to
|
||||
tracked files, and `RELEASE_ALLOW_NOT_NEWER=1` lets 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=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.
|
||||
|
||||
Reference in New Issue
Block a user