summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/build-scripts/create-release.py
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2026-03-06 13:30:59 -0800
committer3gg <3gg@shellblade.net>2026-03-06 13:30:59 -0800
commit30f41c02aec763d32e62351452da9ef582bc3472 (patch)
tree6bec3f65bfdcbf7f1a631da21a6d613bef5db2fa /contrib/SDL-3.2.8/build-scripts/create-release.py
parent452ff21ca02e315c64ceeb3f21c1ea357aeb1bc8 (diff)
Move contrib libraries to contrib repo
Diffstat (limited to 'contrib/SDL-3.2.8/build-scripts/create-release.py')
-rwxr-xr-xcontrib/SDL-3.2.8/build-scripts/create-release.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/contrib/SDL-3.2.8/build-scripts/create-release.py b/contrib/SDL-3.2.8/build-scripts/create-release.py
deleted file mode 100755
index 14916fa..0000000
--- a/contrib/SDL-3.2.8/build-scripts/create-release.py
+++ /dev/null
@@ -1,45 +0,0 @@
1#!/usr/bin/env python3
2
3import argparse
4from pathlib import Path
5import json
6import logging
7import re
8import subprocess
9
10ROOT = Path(__file__).resolve().parents[1]
11
12
13def determine_remote() -> str:
14 text = (ROOT / "build-scripts/release-info.json").read_text()
15 release_info = json.loads(text)
16 if "remote" in release_info:
17 return release_info["remote"]
18 project_with_version = release_info["name"]
19 project, _ = re.subn("([^a-zA-Z_])", "", project_with_version)
20 return f"libsdl-org/{project}"
21
22
23def main():
24 default_remote = determine_remote()
25
26 parser = argparse.ArgumentParser(allow_abbrev=False)
27 parser.add_argument("--ref", required=True, help=f"Name of branch or tag containing release.yml")
28 parser.add_argument("--remote", "-R", default=default_remote, help=f"Remote repo (default={default_remote})")
29 parser.add_argument("--commit", help=f"Input 'commit' of release.yml (default is the hash of the ref)")
30 args = parser.parse_args()
31
32 if args.commit is None:
33 args.commit = subprocess.check_output(["git", "rev-parse", args.ref], cwd=ROOT, text=True).strip()
34
35
36 print(f"Running release.yml workflow:")
37 print(f" remote = {args.remote}")
38 print(f" ref = {args.ref}")
39 print(f" commit = {args.commit}")
40
41 subprocess.check_call(["gh", "-R", args.remote, "workflow", "run", "release.yml", "--ref", args.ref, "-f", f"commit={args.commit}"], cwd=ROOT)
42
43
44if __name__ == "__main__":
45 raise SystemExit(main())