Give the download one permanent address
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 <noreply@anthropic.com>
This commit is contained in:
parent
e20549a094
commit
78f5a44e90
3 changed files with 16 additions and 0 deletions
|
|
@ -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
|
repository ever gets uncomfortable, the history is disposable — only the
|
||||||
newest artifact is ever fetched.
|
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-<build>.apk` name, which
|
||||||
|
is what lets a device that is midway through a download survive a release.
|
||||||
|
|
||||||
## The manifest
|
## The manifest
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|
|
||||||
1
public/latest.apk
Symbolic link
1
public/latest.apk
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
media-6.apk
|
||||||
|
|
@ -56,6 +56,14 @@ def main() -> None:
|
||||||
json.dumps(manifest, indent=2, ensure_ascii=False) + "\n",
|
json.dumps(manifest, indent=2, ensure_ascii=False) + "\n",
|
||||||
encoding="utf-8")
|
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", "add", "-A"], cwd=HERE, check=True)
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["git", "commit", "-m", f"Release {version}+{build}"],
|
["git", "commit", "-m", f"Release {version}+{build}"],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue