diff --git a/ci.py b/ci.py index e0bb4469c0..6aabf25e7b 100644 --- a/ci.py +++ b/ci.py @@ -16,24 +16,35 @@ def main(): commandList = [] if mainCommand == "publishToLocalAndTest": - commandList = [GRADLE_PREFIX + " publishToMavenLocal unifyMappings", "cd test-mod && " + GRADLE_PREFIX + " build genSources"] + commandList = [ + [GRADLE_PREFIX + " publishToMavenLocal unifyMappings", True], + ["cd test-mod && " + GRADLE_PREFIX + " build genSources", False] + ] elif mainCommand == "publish": - commandList = [GRADLE_PREFIX + " publish unifyMappings"] + commandList = [ + [GRADLE_PREFIX + " publish unifyMappings", True] + ] elif mainCommand == "buildPublishToLocalAndTest": - commandList = [GRADLE_PREFIX + " build javadocJar checkMappings mapNamedJar unifyMappings", GRADLE_PREFIX + " publishToMavenLocal unifyMappings", "cd test-mod && " + GRADLE_PREFIX + " build genSources"] + commandList = [ + [GRADLE_PREFIX + " build javadocJar checkMappings mapNamedJar unifyMappings", True], + [GRADLE_PREFIX + " publishToMavenLocal unifyMappings", True], + ["cd test-mod && " + GRADLE_PREFIX + " build genSources", False] + ] failedVersions = [] for command in commandList: testedVersion = [version for version in versions if version not in failedVersions] - print("Running command '" + command + "' for versions " + ", ".join(testedVersion)) + print("Running command '" + command[0] + "' for versions " + ", ".join(testedVersion)) for version in testedVersion: print("Running command for version " + version) - exitCode = yarn.run_command_with_mcversion(version, command) + exitCode = yarn.run_command_with_mcversion(version, command[0]) if exitCode != 0: failedVersions.append(version) + if command[1]: + break if len(failedVersions) < 1: exit(0)