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:
parent
ad36166f50
commit
822445717d
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
/logs
|
||||
/gradle*
|
||||
/*.gradle
|
||||
/build
|
||||
|
10
go4it
10
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)
|
||||
|
Loading…
Reference in New Issue
Block a user