#144 - Polishing.

Correctly format next version identifier.
This commit is contained in:
Mark Paluch
2020-06-19 14:33:17 +02:00
parent ec5a0bd7d6
commit 115f6054fb
4 changed files with 23 additions and 17 deletions

View File

@@ -147,10 +147,10 @@ public class Train implements Streamable<Module> {
List<Project> exclusionList = Arrays.asList(exclusions); List<Project> exclusionList = Arrays.asList(exclusions);
return modules.stream().// return modules.stream() //
filter(module -> !exclusionList.contains(module.getProject())).// .filter(module -> !exclusionList.contains(module.getProject())) //
map(module -> new ModuleIteration(module, new TrainIteration(this, iteration))).// .map(module -> new ModuleIteration(module, new TrainIteration(this, iteration))) //
collect(Collectors.toList()); .collect(Collectors.toList());
} }
public TrainIteration getIteration(String name) { public TrainIteration getIteration(String name) {

View File

@@ -114,11 +114,10 @@ public class TrainIteration implements Streamable<ModuleIteration> {
public String getNextBugfixName() { public String getNextBugfixName() {
Version version = getTrain().getCalver(); Version version = getTrain().getCalver();
int currentBugfixLevel = 0;
if (getIteration().isServiceIteration()) { if (getIteration().isServiceIteration()) {
currentBugfixLevel = getIteration().getBugfixValue(); return version.withBugfix(getIteration().getBugfixValue() + 1).toMajorMinorBugfix();
} }
return version.withBugfix(currentBugfixLevel + 1).toString(); return version.toMajorMinorBugfix();
} }
} }

View File

@@ -163,7 +163,7 @@ class ProjectMetadata {
return train.getCalver().toMajorMinorBugfix(); return train.getCalver().toMajorMinorBugfix();
} }
return String.format("%s-%s", train.getName(), version.getReleaseTrainSuffix()); return String.format("%s-%s", train.getCalver().toMajorMinorBugfix(), version.getReleaseTrainSuffix());
} }
return String.format("%s-%s", train.getName(), return String.format("%s-%s", train.getName(),

View File

@@ -75,7 +75,14 @@ class SaganOperations {
Map<Project, MaintainedVersions> versions = findVersions(trains); Map<Project, MaintainedVersions> versions = findVersions(trains);
ExecutionUtils.run(executor, Streamable.of(versions.entrySet()), ExecutionUtils.run(executor, Streamable.of(versions.entrySet()),
entry -> client.updateProjectMetadata(entry.getKey(), entry.getValue())); entry -> {
if (entry.getKey() == Projects.BOM) {
return;
}
client.updateProjectMetadata(entry.getKey(), entry.getValue());
});
} }
/** /**