From d734011601ae1eecc0e3ae334b58d07e5b4d80d3 Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Tue, 11 Aug 2026 11:36:10 -0600 Subject: Finish multi-platform release restructuring (previous commit was incomplete) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git add silently staged nothing from the previous attempt because one pathspec in that batch (scripts/release/repository, already moved) no longer existed — only the .gitignore-adjacent renames landed. This commit adds what was actually meant to go in: - core/updater.py: releases/download/updates-/ instead of a single shared updates/ tag. - labui.spec: bundles root.json from this platform's own tree. - scripts/release/repo_init.py, repo_release.py: auto-detect platform, operate inside scripts/release//. - .gitignore: per-platform ignore rules (previous commit only carried the file renames, not this). - docs/building.md, scripts/release/README.md: rewritten for the per-platform flow. - Also picks up pre-existing local TUF re-signing (new snapshot/ timestamp signatures, bumped expiry/version) that was sitting uncommitted before this restructuring started. Co-Authored-By: Claude Sonnet 5 --- core/updater.py | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'core') diff --git a/core/updater.py b/core/updater.py index 471ef0b..bbd1bf9 100644 --- a/core/updater.py +++ b/core/updater.py @@ -7,11 +7,16 @@ is_frozen()); calling check_for_update()/apply_update() from a `python main.py` dev run raises, since there's no installed bundle for tufup to update. -Update metadata/targets are hosted on this repo's "updates" GitHub Release -— a fixed tag that never changes between app versions, unlike a normal -per-version release tag, because TUF's top-level metadata (timestamp.json, -snapshot.json, ...) must live at a stable URL the client always checks. -See scripts/release/README.md for the publishing side. +Update metadata/targets are hosted on this repo's "updates-" +GitHub Release — a fixed tag per platform (never changes between app +versions of that platform), because TUF's top-level metadata +(timestamp.json, snapshot.json, ...) must live at a stable URL the client +always checks. Separate tags per platform (not one shared "updates" tag) +because a Windows build and a Linux build of the same app version are +different byte-for-byte archives — TUF metadata filenames aren't +platform-prefixed, so they can't share one release without one platform's +metadata silently overwriting the other's. See scripts/release/README.md +for the publishing side. """ import sys @@ -23,7 +28,21 @@ from core.version import __version__ as CURRENT_VERSION APP_NAME = "labui" -_RELEASE_BASE_URL = "https://github.com/c-kolset/labUI-python/releases/download/updates/" + +def _platform_key() -> str: + """win / mac / linux — must match scripts/release// on the + publishing side and the "updates-" release tag.""" + if sys.platform.startswith("win"): + return "win" + if sys.platform == "darwin": + return "mac" + return "linux" + + +_RELEASE_BASE_URL = ( + f"https://github.com/c-kolset/labUI-python/releases/download/" + f"updates-{_platform_key()}/" +) METADATA_BASE_URL = _RELEASE_BASE_URL TARGET_BASE_URL = _RELEASE_BASE_URL -- cgit v1.2.3