#66 - Tweaked release builds to only promote milestones and release candidates to Artifactory.

This commit is contained in:
Oliver Gierke
2017-11-27 15:22:43 +01:00
parent e642a429fc
commit 93136b8e63
3 changed files with 11 additions and 8 deletions

View File

@@ -309,6 +309,11 @@ class MavenBuildSystem implements BuildSystem {
Assert.notNull(module, "Module iteration must not be null!");
Assert.notNull(information, "Deployment information must not be null!");
if (module.getIteration().isPublic()) {
logger.log(module, "Not a public version, skipping Artifactory deployment.");
return;
}
logger.log(module, "Deploying artifacts to Spring Artifactory…");
CommandLine arguments = CommandLine.of(Goal.CLEAN, Goal.DEPLOY, //

View File

@@ -91,9 +91,11 @@ class ReleaseCommands extends TimedCommand {
public void buildRelease(@CliOption(key = "", mandatory = true) TrainIteration iteration, //
@CliOption(key = "project", mandatory = false) String projectName) throws Exception {
if (projectName != null) {
if (!iteration.getIteration().isPublic()) {
deployment.verifyAuthentication();
}
if (projectName != null) {
Project project = Projects.requiredByName(projectName);
ModuleIteration module = iteration.getModule(project);
@@ -103,11 +105,7 @@ class ReleaseCommands extends TimedCommand {
} else {
deployment.verifyAuthentication();
List<DeploymentInformation> deploymentInformation = build.performRelease(iteration);
deploymentInformation.forEach(deployment::promote);
build.performRelease(iteration).forEach(deployment::promote);
}
}

View File

@@ -72,7 +72,7 @@ class MaintainedVersion implements Comparable<MaintainedVersion> {
* @return
*/
MaintainedVersion nextDevelopmentVersion() {
return MaintainedVersion.of(project, version.getNextDevelopmentVersion(), train);
return MaintainedVersion.of(project, version.getNextBugfixVersion(), train);
}
/*