From 78f5a44e90c4d8beb0d98ab7b9e89fe0353d8077 Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 30 Aug 2026 18:01:31 +0200 Subject: [PATCH] Give the download one permanent address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The manifest names the current artifact and the directory listing is off, so "where do I download it by hand" could only be answered by reading the manifest first. latest.apk is a symlink the release script repoints — git stores it as a path, so it costs bytes rather than another 34MB a release, and every past build stays reachable under its own name, which is what lets a device midway through a download survive a release. Co-Authored-By: Claude Opus 5 --- README.md | 7 +++++++ public/latest.apk | 1 + release.py | 8 ++++++++ 3 files changed, 16 insertions(+) create mode 120000 public/latest.apk diff --git a/README.md b/README.md index b5006dc..41305f0 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,13 @@ the cheaper trade against standing up artifact storage for one app; if the repository ever gets uncomfortable, the history is disposable — only the newest artifact is ever fetched. +## Downloading by hand + +`https://media-updates.petruzalekr.cz/latest.apk` always points at the newest +build — a symlink the release script repoints, so the address never changes. +Every past build stays reachable under its own `media-.apk` name, which +is what lets a device that is midway through a download survive a release. + ## The manifest ```json diff --git a/public/latest.apk b/public/latest.apk new file mode 120000 index 0000000..6646af6 --- /dev/null +++ b/public/latest.apk @@ -0,0 +1 @@ +media-6.apk \ No newline at end of file diff --git a/release.py b/release.py index 94e2efb..d51eb98 100755 --- a/release.py +++ b/release.py @@ -56,6 +56,14 @@ def main() -> None: json.dumps(manifest, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + # A stable name, so "where do I download it" has one permanent answer + # instead of one that has to be looked up in the manifest each time. A + # symlink rather than a copy: git stores it as a path, so it costs bytes + # rather than another 34MB per release. + latest = public / "latest.apk" + latest.unlink(missing_ok=True) + latest.symlink_to(name) + subprocess.run(["git", "add", "-A"], cwd=HERE, check=True) subprocess.run( ["git", "commit", "-m", f"Release {version}+{build}"],