Files
libretro/scripts/pr_checks.py
T
Abdessamad Derraz c4fdf12874 refactor: release, installer_build, devtools pkgs
The release tools, the installer build tools and the repository's
commit and PR checks keep their commands and move their code into
three packages. The release record readers move to model.releaserecord,
romfolders to model, the buildbot check to scraper. The site reads the
handheld launchers and the bootstrap pin from installer_build.
2026-11-18 20:44:12 +01:00

34 lines
930 B
Python

#!/usr/bin/env python3
"""Run the checks validate.yml runs on a pull request, in its order.
Usage:
python scripts/pr_checks.py
python scripts/pr_checks.py --list
Each step runs even when an earlier one failed, as CI runs them, and the
summary names every step that failed or could not run. A step whose tool is
absent (npm, python3.8, vermin) is reported as not run, with what provides it.
"""
from __future__ import annotations
import argparse
from devtools.prchecks import STEPS, run, shown
def main() -> int:
parser = argparse.ArgumentParser(allow_abbrev=False, description=__doc__.splitlines()[0])
parser.add_argument("--list", action="store_true", help="print the steps and exit")
args = parser.parse_args()
if args.list:
for step in STEPS:
print(shown(step))
return 0
return run()
if __name__ == "__main__":
from core.cli import run_cli
run_cli(main)