1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-19 00:04:53 +00:00

Put run configurations into folders

This commit is contained in:
Jonathan Coates 2021-09-26 09:55:50 +01:00
parent ad36166f50
commit 822445717d
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
2 changed files with 10 additions and 1 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/logs
/gradle*
/*.gradle
/build

10
go4it
View File

@ -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)