Skip to content

Check it yourself

stepmaniay-verification Public

Tests anyone can run against StepManiaY's published builds and ITGmania 1.3.0, the release it grew from.

Clone

Clone with HTTPS

Plain git over HTTPS: no account, no app, nothing else to install.

Download the source tarball 3.0 MB

32 lines · 968 bytes

Raw
"""release.json for the website: the commit published, its source tarball (name, size, SHA-256)
and the latest results of every test (summarize.py's tables).

    python3 release.py <commit> <tarball> <results folder> [...]
"""

from __future__ import annotations

import hashlib
import json
import sys
from datetime import datetime, timezone
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent))
import summarize  # noqa: E402


def main() -> None:
    commit, tarball, *folders = sys.argv[1:]
    data = Path(tarball).read_bytes()
    release = {
        "commit": commit,
        "published": datetime.now(timezone.utc).isoformat(timespec="seconds"),
        "tarball": {"name": Path(tarball).name, "size": len(data), "sha256": hashlib.sha256(data).hexdigest()},
        "results": [summarize.summary(Path(f)) for f in folders],
    }
    print(json.dumps(release, indent=2, ensure_ascii=False))


if __name__ == "__main__":
    main()