From cc257acee79b228db07c1f2fb8283c4e12a7fb21 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Thu, 31 Mar 2016 18:33:57 +0200 Subject: [PATCH] #15 - Release preparation now already sets the project versions to the release ones. We now already run the build commands to tweak the versions in the release preparations which allows us to rerun the release build in case it fails at some point. --- .../data/release/build/BuildOperations.java | 2 -- .../springframework/data/release/cli/ReleaseCommands.java | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/release-tools/src/main/java/org/springframework/data/release/build/BuildOperations.java b/release-tools/src/main/java/org/springframework/data/release/build/BuildOperations.java index bf2048c..075bc1c 100644 --- a/release-tools/src/main/java/org/springframework/data/release/build/BuildOperations.java +++ b/release-tools/src/main/java/org/springframework/data/release/build/BuildOperations.java @@ -90,8 +90,6 @@ public class BuildOperations { * @return */ public DeploymentInformation performRelease(ModuleIteration module) { - - prepareVersion(module, Phase.PREPARE); return buildAndDeployRelease(module); } diff --git a/release-tools/src/main/java/org/springframework/data/release/cli/ReleaseCommands.java b/release-tools/src/main/java/org/springframework/data/release/cli/ReleaseCommands.java index 7fdf91d..55c2715 100644 --- a/release-tools/src/main/java/org/springframework/data/release/cli/ReleaseCommands.java +++ b/release-tools/src/main/java/org/springframework/data/release/cli/ReleaseCommands.java @@ -82,10 +82,11 @@ public class ReleaseCommands implements CommandMarker { misc.prepareChangelogs(iteration); misc.updateResources(iteration); - build.updateProjectDescriptors(iteration, Phase.PREPARE); - git.commit(iteration, "Prepare %s."); + + build.prepareVersions(iteration, Phase.PREPARE); + git.commit(iteration, "Release version %s."); } @CliCommand(value = "release build") @@ -105,7 +106,7 @@ public class ReleaseCommands implements CommandMarker { deployment.verifyAuthentication(); List deploymentInformation = build.performRelease(iteration); - git.commit(iteration, "Release version %s."); + deploymentInformation.forEach(deployment::promote); build.prepareVersions(iteration, Phase.CLEANUP);