From 09b8b54d196dc7685f557590a651a8ef97540cda Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 19 Oct 2026 07:28:37 +0200 Subject: [PATCH] Release app config: the engine travels inside every installer, signed updater artifacts overlay, macOS 15 minimum --- apps/desktop/src-tauri/tauri.conf.json | 5 +-- .../desktop/src-tauri/tauri.release.conf.json | 5 +++ packaging/UPDATES.md | 4 ++- tests/terminal/test_release_config.py | 34 +++++++++++++++++++ 4 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 apps/desktop/src-tauri/tauri.release.conf.json create mode 100644 tests/terminal/test_release_config.py diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 8508eb94..55f664d1 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -35,7 +35,8 @@ "../../host/package.json": "host/package.json", "resources/node": "node", "resources/control": "control", - "resources/harness": "harness" + "resources/harness": "harness", + "resources/engine-bundle": "engine-bundle" }, "linux": { "appimage": { @@ -43,7 +44,7 @@ } }, "macOS": { - "minimumSystemVersion": "11.0", + "minimumSystemVersion": "15.0", "entitlements": "entitlements.plist" }, "createUpdaterArtifacts": false, diff --git a/apps/desktop/src-tauri/tauri.release.conf.json b/apps/desktop/src-tauri/tauri.release.conf.json new file mode 100644 index 00000000..d57cd002 --- /dev/null +++ b/apps/desktop/src-tauri/tauri.release.conf.json @@ -0,0 +1,5 @@ +{ + "bundle": { + "createUpdaterArtifacts": true + } +} diff --git a/packaging/UPDATES.md b/packaging/UPDATES.md index 76a11198..7e6d8d70 100644 --- a/packaging/UPDATES.md +++ b/packaging/UPDATES.md @@ -115,7 +115,9 @@ A key rotation is a release that carries both public keys; the old private key s python packaging/feed_tool.py sign-package --key python packaging/feed_tool.py pack-engine --out RELEASE/engine python packaging/feed_tool.py pack-control --version V --platform P --out RELEASE/control - TAURI_SIGNING_PRIVATE_KEY= npx tauri build --config tauri.release.conf.json # makes the signed installers + # the app installers carry the engine out of the box: fill apps/desktop/src-tauri/resources/engine-bundle/ with the signed + # engine packages first (the tester builds do the same); tauri.conf.json lists that folder as a resource for every build + TAURI_SIGNING_PRIVATE_KEY= npx tauri build --config src-tauri/tauri.release.conf.json # signed installers + latest.json inputs python packaging/feed_tool.py build-feed --out RELEASE --sequence N --key --engine RELEASE/engine --control RELEASE/control --app-json python packaging/feed_tool.py verify-feed RELEASE --pub diff --git a/tests/terminal/test_release_config.py b/tests/terminal/test_release_config.py new file mode 100644 index 00000000..aaf5b25c --- /dev/null +++ b/tests/terminal/test_release_config.py @@ -0,0 +1,34 @@ +"""The release app configuration: the engine travels inside every installer, the updater signs, the Mac minimum matches the Metal engine.""" +from __future__ import annotations + +import json +import unittest +from pathlib import Path + +TAURI = Path(__file__).resolve().parents[2] / "apps" / "desktop" / "src-tauri" + + +def load(name: str) -> dict: + return json.loads((TAURI / name).read_text(encoding="utf-8-sig")) + + +class ReleaseConfig(unittest.TestCase): + def test_every_installer_bundles_the_engine(self): + self.assertEqual(load("tauri.conf.json")["bundle"]["resources"]["resources/engine-bundle"], "engine-bundle") + self.assertEqual(load("tauri.tester.conf.json")["bundle"]["resources"]["resources/engine-bundle"], "engine-bundle") # the same place + + def test_the_release_overlay_makes_signed_updater_artifacts(self): + self.assertIs(load("tauri.release.conf.json")["bundle"]["createUpdaterArtifacts"], True) + self.assertIs(load("tauri.conf.json")["bundle"]["createUpdaterArtifacts"], False) # a development build needs no private key + + def test_the_mac_app_needs_the_macos_the_metal_engine_needs(self): + self.assertEqual(load("tauri.conf.json")["bundle"]["macOS"]["minimumSystemVersion"], "15.0") + + def test_the_updater_points_at_github_releases(self): + up = load("tauri.conf.json")["plugins"]["updater"] + self.assertEqual(up["endpoints"], ["https://github.com/Niko1221/Strata/releases/latest/download/latest.json"]) + self.assertNotIn("REPLACE", up["pubkey"]) + + +if __name__ == "__main__": + unittest.main()