fix: publish the games index whole or not at all

install/games/, the event schema, the launcher index and wiki/installer.md were truncated at their final name, so an interrupted run left a committed-looking partial JSON document. They now go through write_text_atomic.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:16:59 +01:00
1 parent 80f736c167
commit 891741433b
5 files changed
+31 -4

No files matched your search

+3 -1
View File
@@ -45,6 +45,8 @@ import zipfile
from pathlib import Path, PurePosixPath
from typing import Callable
from artifacts import write_text_atomic
ROOT = Path(__file__).resolve().parent.parent
PAGE = ROOT / "wiki" / "installer.md"
INSTALLER = ROOT / "install.py"
@@ -643,7 +645,7 @@ def main(argv: list[str] | None = None) -> int:
print(f"{args.page} differs from install.py and install/*.json: run "
"python scripts/generate_installer_doc.py", file=sys.stderr)
return 1
args.page.write_text(text, encoding="utf-8")
write_text_atomic(str(args.page), text)
print(f"Wrote {args.page}")
return 0