Adopt release trains to branch renaming.

Closes #209
This commit is contained in:
Mark Paluch
2022-04-04 10:49:01 +02:00
parent 15661e087e
commit 2c8edae9f4
2 changed files with 12 additions and 4 deletions

View File

@@ -72,6 +72,7 @@ public class ReleaseTrains {
RAJ = Q.next("Raj", Transition.MINOR) //
.withCalver("2021.2") //
.withAlwaysUseBranch(true)
.withIterations(new Train.Iterations(M1, M2, M3, M4, M5, RC1, RC2, GA, SR1, SR2, SR3, SR4, SR5));
TURING = PASCAL.next("Turing", Transition.MAJOR, //
@@ -80,7 +81,6 @@ public class ReleaseTrains {
.filterModules(module -> !module.getProject().equals(ENVERS))
.filterModules(module -> !module.getProject().equals(R2DBC))
.filterModules(module -> !module.getProject().equals(JDBC)) // filter "old" JDBC without R2DBC submodule
.withAlwaysUseBranch(true)
.withIterations(new Train.Iterations(M1, M2, M3, M4, M5, RC1, RC2, GA, SR1, SR2, SR3, SR4, SR5));
// Trains

View File

@@ -108,6 +108,15 @@ public class Train implements Streamable<Module> {
return modules.stream().filter(module -> module.getProject().equals(project)).findFirst();
}
/**
* Creates a new release {@link Train} with a given {@code name}. Resets the {@link #alwaysUseBranch} flag as we
* typically do not want branch-inheritance across trains.
*
* @param name
* @param transition
* @param additionalModules
* @return
*/
public Train next(String name, Transition transition, Module... additionalModules) {
Set<Module> modules = Stream.concat(this.modules.stream(), Stream.of(additionalModules)).//
@@ -116,7 +125,7 @@ public class Train implements Streamable<Module> {
(it, additionalModule) -> it.hasSameProjectAs(additionalModule) ? additionalModule : it))
.collect(Collectors.toSet());
return new Train(name, Modules.of(modules), calver, iterations, alwaysUseBranch, javaVersion);
return new Train(name, Modules.of(modules), calver, iterations, false, javaVersion);
}
public Train filterModules(Predicate<Module> filterPredicate) {
@@ -259,8 +268,7 @@ public class Train implements Streamable<Module> {
public static class Iterations implements Iterable<Iteration> {
public static Iterations DEFAULT = new Iterations(M1, M2, M3, RC1, RC2, GA, SR1, SR2, SR3, SR4, SR5, SR6, SR7, SR8,
SR9, SR10,
SR11, SR12, SR13, SR14, SR15, SR16, SR17, SR18, SR19, SR20, SR21, SR22, SR23, SR24);
SR9, SR10, SR11, SR12, SR13, SR14, SR15, SR16, SR17, SR18, SR19, SR20, SR21, SR22, SR23, SR24);
private final List<Iteration> iterations;