diff options
| author | Christian Kolset <ckolset@colostate.edu> | 2026-08-11 11:36:10 -0600 |
|---|---|---|
| committer | Christian Kolset <ckolset@colostate.edu> | 2026-08-11 11:36:10 -0600 |
| commit | d734011601ae1eecc0e3ae334b58d07e5b4d80d3 (patch) | |
| tree | 23d3177ff85a045c8316325a998e741cbde18e20 /core | |
| parent | 04f8cc80c798fe3f3eb9690721da7cd476d4890f (diff) | |
Finish multi-platform release restructuring (previous commit was incomplete)
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-<platform>/ 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/<platform>/.
- .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 <noreply@anthropic.com>
Diffstat (limited to 'core')
| -rw-r--r-- | core/updater.py | 31 |
1 files changed, 25 insertions, 6 deletions
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-<platform>" +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/<key>/ on the + publishing side and the "updates-<key>" 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 |
