mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-20 08:37:50 -06:00
feat: link the change reports and the wanted CSV
This commit is contained in:
1 parent
ef477036d6
commit
398246b064
4 files changed
+36
-2
No files matched your search
@@ -1847,6 +1847,15 @@ def _publish_manifests(api: Path) -> list[tuple]:
|
||||
_record(targets / source.name)
|
||||
assets.append((targets / source.name, f"Target list: {source.stem}",
|
||||
"application/json", "schemas/target-manifest.schema.json"))
|
||||
# Every change each updated platform file carries, for a maintainer who
|
||||
# reviews them by script: the Exports page linked only the files.
|
||||
exports = api / "exports"
|
||||
exports.mkdir(parents=True, exist_ok=True)
|
||||
for source in sorted((_REPO_ROOT / "exports").glob("*.json")):
|
||||
shutil.copy2(source, exports / source.name)
|
||||
_record(exports / source.name)
|
||||
assets.append((exports / source.name, f"Updated platform file, its changes: {source.stem}",
|
||||
"application/json", None))
|
||||
release = _REPO_ROOT / "release.json"
|
||||
if release.is_file():
|
||||
shutil.copy2(release, api / "release.json")
|
||||
@@ -5344,6 +5353,8 @@ def generate_provenance_page(
|
||||
"matching one of these hashes is welcome: see "
|
||||
"[Contributing](contributing.md).",
|
||||
"",
|
||||
markup.button("Download the list (CSV)", "downloads/provenance-wanted.csv"),
|
||||
"",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ EXPORTS_DIR = "exports"
|
||||
REPO_BLOB = "https://github.com/Abdess/retrobios/blob/main"
|
||||
REPO_TREE = "https://github.com/Abdess/retrobios/tree/main"
|
||||
REPO_RAW = "https://raw.githubusercontent.com/Abdess/retrobios/main"
|
||||
# Where the site publishes each report, beside the API (generate_site).
|
||||
API_EXPORTS = "api/v1/exports"
|
||||
|
||||
# Report key, then how a line of it reads on the page.
|
||||
CHANGE_KINDS = (
|
||||
@@ -318,16 +320,20 @@ def generate_exports_page(reports: list[dict], names: dict[str, str]) -> str:
|
||||
originals = report.get("originals") or {}
|
||||
files = report["files"]
|
||||
raw = [f"{REPO_RAW}/{EXPORTS_DIR}/{platform}/{name}" for name in files]
|
||||
# Every change as JSON, the report the page is written from.
|
||||
changes = markup.button("Every change (JSON)", f"{API_EXPORTS}/{platform}.json")
|
||||
if len(files) == 1:
|
||||
lines.extend([
|
||||
markup.button("Download the updated file", raw[0], primary=True) + " "
|
||||
+ markup.button("See it on GitHub", f"{REPO_BLOB}/{EXPORTS_DIR}/{platform}/{files[0]}"),
|
||||
+ markup.button("See it on GitHub", f"{REPO_BLOB}/{EXPORTS_DIR}/{platform}/{files[0]}")
|
||||
+ " " + changes,
|
||||
"",
|
||||
])
|
||||
else:
|
||||
lines.extend([
|
||||
markup.button(f"Browse the {len(files)} updated files",
|
||||
f"{REPO_TREE}/{EXPORTS_DIR}/{platform}", primary=True),
|
||||
f"{REPO_TREE}/{EXPORTS_DIR}/{platform}", primary=True)
|
||||
+ " " + changes,
|
||||
"",
|
||||
])
|
||||
if len(originals) > 1:
|
||||
|
||||
Reference in new issue
Block a user