From 822445717db51078027acdf05c16d18e6a168320 Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sun, 26 Sep 2021 09:55:50 +0100 Subject: [PATCH] Put run configurations into folders --- .gitignore | 1 + go4it | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cf1c59e74..faa5cefcf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /logs /gradle* /*.gradle +/build diff --git a/go4it b/go4it index 21daecbcd..5f80b4f21 100755 --- a/go4it +++ b/go4it @@ -116,17 +116,25 @@ def gen_runs() -> None: if branch.name == version: break else: - print("Cannot find Java for branch") + print(f"Cannot find Java for version for {path}") continue component = 'testMod' if name.startswith('Test') else 'main' xml = ET.parse(path) + + # Put run configurations in folders + configuration = xml.find("./configuration") + if configuration: + configuration.set("folderName", version) + + # Ensure they're linked to the right CC:T version module = xml.find("./configuration/module") if module is None: print("Unknown module for " + path.name) else: module.set("name", f"cc-tweaked.{version}.{component}") + # Force a specific JDK version version = xml.find("./configuration/option[@name='ALTERNATIVE_JRE_PATH']") if version: version.set("value", branch.java)