mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-25 05:09:03 -05:00
feat: add schema_version to release.json
This commit is contained in:
1 parent
2ba0effd3b
commit
00cd203b23
3 files changed
+10
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"tag": "v2026.10.10",
|
||||
"packs": {
|
||||
"Batocera_43.1_BIOS_Pack.zip": {
|
||||
|
||||
@@ -5,8 +5,12 @@
|
||||
"description": "What the packs of the latest release hold, read from the archives when the release is cut.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["tag", "packs"],
|
||||
"required": ["schema_version", "tag", "packs"],
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": 1,
|
||||
"description": "Format version of this record, raised when a field changes meaning or goes away."
|
||||
},
|
||||
"tag": { "type": "string", "pattern": "^v[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}$" },
|
||||
"packs": {
|
||||
"type": "object",
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user