Add command to create branches.

Closes #100
This commit is contained in:
Mark Paluch
2024-11-13 10:53:14 +01:00
parent 6371024358
commit ddd4a542c5

View File

@@ -206,14 +206,26 @@ class ReleaseCommands extends TimedCommand {
BranchMapping branches = git.createMaintenanceBranches(iteration, true);
// Set project version to maintenance once
setupMaintenanceVersions(iteration);
}
}
setupMaintenanceVersions(iteration, branches);
}
}
}
@CliCommand(value = "release create-branches")
public void createBranches(@CliOption(key = "", mandatory = true) TrainIteration iteration) throws Exception {
if (!iteration.getTrain().isAlwaysUseBranch()) {
throw new IllegalArgumentException(
String.format("Cannot create branches as train %s does not use branches.", iteration.getTrain().getCalver()));
}
// Create bugfix branches
BranchMapping branchMapping = git.createMaintenanceBranches(iteration, false);
// Set project version to maintenance once
setupMaintenanceVersions(iteration, branchMapping);
}
@CliCommand(value = "release documentation")
public void triggerDocumentation(@CliOption(key = "", mandatory = true) TrainIteration iteration,
@CliOption(key = "module", mandatory = false) String module) {