fix(desktop): sync tauri.conf.json version to the release tag, stop swallowing install failures
v0.1.1 was tagged but tauri.conf.json's own "version" field (what Tauri
bakes into the bundle filename/internal version) stayed at 0.1.0 — the
signed binary didn't match what latest.json claimed to describe, so every
update download failed signature verification. desktop-updater.ts's single
catch{} swallowed that identically to "offline", so it looked like nothing
happened at all. release.yml now syncs tauri.conf.json's version from the
git tag before building; the updater now logs a real post-accept failure
instead of silently reverting.
This commit is contained in:
@@ -41,11 +41,22 @@ export async function checkForDesktopUpdate(
|
||||
|
||||
// Download + install the signed update (signature verified against the
|
||||
// pubkey in tauri.conf.json), then relaunch into the new version.
|
||||
await update.downloadAndInstall();
|
||||
try {
|
||||
await update.downloadAndInstall();
|
||||
} catch (err) {
|
||||
// A real update WAS found and accepted — this is a genuine install
|
||||
// failure (bad signature, corrupted download, disk/permission issue),
|
||||
// not "offline". Surface it instead of silently reverting to the old
|
||||
// version with no explanation.
|
||||
console.error("desktop update download/install failed:", err);
|
||||
throw err;
|
||||
}
|
||||
const { relaunch } = await import("@tauri-apps/plugin-process");
|
||||
await relaunch();
|
||||
} catch {
|
||||
} catch (err) {
|
||||
// Offline / endpoint unreachable / no update server yet → ignore. The app
|
||||
// keeps running on the current version; checking again next launch.
|
||||
// keeps running on the current version; checking again next launch. Still
|
||||
// log it so a real install failure (rethrown above) isn't invisible.
|
||||
console.warn("desktop update check/apply skipped:", err);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user