Public Access
Complete 26.3 parity acceptance and dual-version release workflow
Build and smoke / changes (push) Waiting to run
Build and smoke / changes (push) Waiting to run
This commit is contained in:
1 parent
41daff1e61
commit
4a59fb5d02
26 files changed
+1241
-369
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Select affected game targets; docs and release tooling do not trigger game tests."""
|
||||
import argparse
|
||||
import json
|
||||
import subprocess
|
||||
|
||||
|
||||
def affected(paths):
|
||||
targets = set()
|
||||
for path in paths:
|
||||
if path.startswith("src/main/java/") or path in {"build.gradle", "settings.gradle", "gradle.properties"}:
|
||||
targets.add("mc1211")
|
||||
if path.startswith("ports/mc263/") and not path.endswith(".md"):
|
||||
targets.add("mc263")
|
||||
if path.startswith(("src/main/resources/", "src/generated/", "buildSrc/", "gradle/")) or path in {"gradlew", "gradlew.bat"}:
|
||||
targets.update(("mc1211", "mc263"))
|
||||
return sorted(targets)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--base", required=True)
|
||||
args = parser.parse_args()
|
||||
paths = subprocess.check_output(["git", "diff", "--name-only", args.base, "HEAD"], text=True).splitlines()
|
||||
values = {"mc1211": ("21", "build"), "mc263": ("25", "-p ports/mc263 build")}
|
||||
matrix = {"include": [{"target": target, "java": values[target][0], "gradle_args": values[target][1]}
|
||||
for target in affected(paths)]}
|
||||
print(json.dumps(matrix, separators=(",", ":")))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user