feat: add schema_version to release.json

This commit is contained in:
Abdessamad Derraz committed 2026-10-23 18:52:04 +02:00
1 parent 2ba0effd3b
commit 00cd203b23
3 files changed
+10 -2

No files matched your search

+4 -1
View File
@@ -31,6 +31,9 @@ from common import (
)
RECORD = "release.json"
# The record's format, which release.schema.json pins: a reader holding the
# file alone can tell which shape it reads.
SCHEMA_VERSION = 1
# Each registered platform has a page at get/<platform>/ on the site: the
# current pack's files, or the command when no release publishes one. The
# address outlives every release, so a link written elsewhere keeps working.
@@ -120,7 +123,7 @@ def _read_record(dist: Path, tag: str, owners: dict[str, list[str]]) -> dict:
"assets": [path.name for path in paths],
"platforms": owners[name],
}
return {"tag": tag, "packs": packs}
return {"schema_version": SCHEMA_VERSION, "tag": tag, "packs": packs}
def load_record(path: str | Path = RECORD) -> dict: