From 320a071f58a830b1c86058b6bf49cec022f0ece7 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Fri, 17 Jul 2020 17:34:40 +0200 Subject: [PATCH 1/9] GH-195 Fix profile for publish/deploying docs This change included changing the command name from plural to signular publish-docs-command(s) Resolves #195 --- docs/src/main/asciidoc/_configprops.adoc | 6 +- .../src/main/resources/application.yml | 7 +- .../src/main/resources/application.yml | 9 +- .../releaser/internal/ReleaserProperties.java | 88 ++++++++++++------- .../internal/ReleaserPropertiesUpdater.java | 4 +- .../project/ProjectCommandExecutor.java | 18 ++-- .../project/ProjectCommandExecutorTests.java | 19 ++-- .../src/test/resources/application.yml | 12 +-- .../releaser/internal/spring/ArgsBuilder.java | 6 +- 9 files changed, 94 insertions(+), 75 deletions(-) diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc index e6859e9e..4554a7ab 100644 --- a/docs/src/main/asciidoc/_configprops.adoc +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -5,7 +5,7 @@ |releaser.bash.deploy-command | echo "{{systemProps}}" | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating. |releaser.bash.deploy-guides-command | echo "{{systemProps}}" | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating. |releaser.bash.generate-release-train-docs-command | echo "{{version}}" | Command to be executed to generate release train documentation. -|releaser.bash.publish-docs-commands | [mkdir -p target, echo "{{version}}"] | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating. +|releaser.bash.publish-docs-command | [mkdir -p target, echo "{{version}}"] | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating. |releaser.bash.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property. |releaser.bash.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish. |releaser.fixed-versions | | Project name to its version - overrides all versions retrieved from a release train repository like Spring Cloud Release. @@ -43,14 +43,14 @@ |releaser.gradle.generate-release-train-docs-command | ./gradlew generateReleaseTrainDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to generate release train documentation. |releaser.gradle.gradle-props-substitution | | A mapping that should be applied to {@code gradle.properties} in order to perform a substitution of properties. The mapping is from a property inside {@code gradle.properties} to the projects name. Example. In {@code gradle.properties} you have {@code verifierVersion=1.0.0} . You want this property to get updated with the value of {@code spring-cloud-contract} version. Then it's enough to do the mapping like this for this Releaser's property: {@code verifierVersion=spring-cloud-contract}. |releaser.gradle.ignored-gradle-regex | | List of regular expressions of ignored gradle props. Defaults to test projects and samples. -|releaser.gradle.publish-docs-commands | [./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}] | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. +|releaser.gradle.publish-docs-command | [./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}] | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. |releaser.gradle.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property. |releaser.gradle.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish. |releaser.maven.build-command | ./mvnw clean install -B -Pdocs {{systemProps}} | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating. |releaser.maven.deploy-command | ./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}} | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating. |releaser.maven.deploy-guides-command | ./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}} | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating. |releaser.maven.generate-release-train-docs-command | bash release_train.sh --retrieveversions --version {{version}} --ghpages --auto | Command to be executed to generate release train documentation. -|releaser.maven.publish-docs-commands | [mkdir -p target, wget https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/ghpages.sh -O target/gh-pages.sh, chmod +x target/gh-pages.sh, ./target/gh-pages.sh -v {{version}} -c] | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. +|releaser.maven.publish-docs-command | [mkdir -p target, wget https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/ghpages.sh -O target/gh-pages.sh, chmod +x target/gh-pages.sh, ./target/gh-pages.sh -v {{version}} -c] | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. |releaser.maven.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property. |releaser.maven.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish. |releaser.meta-release.enabled | false | Are we releasing the whole suite of apps or only one? diff --git a/projects/spring-cloud-stream/src/main/resources/application.yml b/projects/spring-cloud-stream/src/main/resources/application.yml index 829c1235..642fd88b 100644 --- a/projects/spring-cloud-stream/src/main/resources/application.yml +++ b/projects/spring-cloud-stream/src/main/resources/application.yml @@ -24,11 +24,8 @@ releaser: build-command: "./mvnw clean install -B -Pdocs {{systemProps}}" deploy-command: "./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}}" deploy-guides-command: "./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}}" - publish-docs-commands: - - "mkdir -p target" - - "wget https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/ghpages.sh -O target/gh-pages.sh" - - "chmod +x target/gh-pages.sh" - - "./target/gh-pages.sh -v {{version}} -c" + + publish-docs-command: "./mvnw deploy -DskipTests -B -Pfast,deploy,docs {{systemProps}}" generate-release-train-docs-command: "bash release_train.sh --retrieveversions --version {{version}} --ghpages --auto" sagan: update-sagan: true diff --git a/projects/spring-cloud/src/main/resources/application.yml b/projects/spring-cloud/src/main/resources/application.yml index c69427cb..d29c3797 100644 --- a/projects/spring-cloud/src/main/resources/application.yml +++ b/projects/spring-cloud/src/main/resources/application.yml @@ -63,8 +63,7 @@ releaser: build-command: "./mvnw clean install -B -Pdocs {{systemProps}}" deploy-command: "./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}}" deploy-guides-command: "./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}}" - publish-docs-commands: - - "./mvnw deploy -DskipTests -B -Pfast,deploy,docs -pl docs {{systemProps}}" + publish-docs-command: "./mvnw deploy -DskipTests -B -Pfast,deploy,docs -pl docs {{systemProps}}" generate-release-train-docs-command: "./mvnw clean deploy -Pdocs,train-docs -pl train-docs" system-properties: "" wait-time-in-minutes: 20 @@ -72,8 +71,7 @@ releaser: build-command: 'echo "{{systemProps}}"' deploy-command: 'echo "{{systemProps}}"' deploy-guides-command: 'echo "{{systemProps}}"' - publish-docs-commands: - - 'echo "{{systemProps}}"' + publish-docs-command: 'echo "{{systemProps}}"' generate-release-train-docs-command: 'echo "{{systemProps}}"' system-properties: "" wait-time-in-minutes: 20 @@ -92,8 +90,7 @@ releaser: build-command: "./gradlew clean build publishToMavenLocal --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}" deploy-command: "./gradlew publish --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}" deploy-guides-command: "./gradlew clean build deployGuides --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}" - publish-docs-commands: - - "echo 'TODO'" + publish-docs-command: "echo 'TODO'" generate-release-train-docs-command: "echo 'TODO'" system-properties: "" wait-time-in-minutes: 20 diff --git a/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java b/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java index 143fd9b2..8c0fa01c 100644 --- a/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java +++ b/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java @@ -18,7 +18,6 @@ package releaser.internal; import java.io.Serializable; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; @@ -251,12 +250,12 @@ public class ReleaserProperties implements Serializable { /** * @return docs publishing commands */ - String[] getPublishDocsCommands(); + String getPublishDocsCommand(); /** * @param publishDocsCommands to set */ - void setPublishDocsCommands(String[] publishDocsCommands); + void setPublishDocsCommand(String publishDocsCommands); /** * @return generate release train docs command @@ -962,15 +961,8 @@ public class ReleaserProperties implements Serializable { **/ private String deployGuidesCommand = "./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}}"; - /** - * Command to be executed to publish documentation. If present "{{version}}" will - * be replaced by the provided version. - */ - private String[] publishDocsCommands = { "mkdir -p target", - "wget https://raw.githubusercontent.com/spring-cloud/" - + "spring-cloud-build/master/" - + "docs/src/main/asciidoc/ghpages.sh -O target/gh-pages.sh", - "chmod +x target/gh-pages.sh", "./target/gh-pages.sh -v {{version}} -c" }; + + private String publishDocsCommand = "./mvnw deploy -DskipTests -B -Pfast,deploy,docs -pl docs {{systemProps}}"; /** * Command to be executed to generate release train documentation. @@ -990,10 +982,12 @@ public class ReleaserProperties implements Serializable { */ private long waitTimeInMinutes = 20; + @Override public String getBuildCommand() { return this.buildCommand; } + @Override public void setBuildCommand(String buildCommand) { this.buildCommand = buildCommand; } @@ -1006,43 +1000,53 @@ public class ReleaserProperties implements Serializable { this.waitTimeInMinutes = waitTimeInMinutes; } + @Override public String getDeployCommand() { return this.deployCommand; } + @Override public void setDeployCommand(String deployCommand) { this.deployCommand = deployCommand; } + @Override public String getDeployGuidesCommand() { return this.deployGuidesCommand; } + @Override public void setDeployGuidesCommand(String deployGuidesCommand) { this.deployGuidesCommand = deployGuidesCommand; } - public String[] getPublishDocsCommands() { - return this.publishDocsCommands; + @Override + public String getPublishDocsCommand() { + return this.publishDocsCommand; } - public void setPublishDocsCommands(String[] publishDocsCommands) { - this.publishDocsCommands = publishDocsCommands; + @Override + public void setPublishDocsCommand(String publishDocsCommand) { + this.publishDocsCommand = publishDocsCommand; } + @Override public String getGenerateReleaseTrainDocsCommand() { return this.generateReleaseTrainDocsCommand; } + @Override public void setGenerateReleaseTrainDocsCommand( String generateReleaseTrainDocsCommand) { this.generateReleaseTrainDocsCommand = generateReleaseTrainDocsCommand; } + @Override public String getSystemProperties() { return this.systemProperties; } + @Override public void setSystemProperties(String systemProperties) { this.systemProperties = systemProperties; } @@ -1051,7 +1055,7 @@ public class ReleaserProperties implements Serializable { public String toString() { return "Maven{" + "buildCommand='" + this.buildCommand + '\'' + ", deployCommand='" + this.deployCommand + '\'' - + ", publishDocsCommands=" + Arrays.toString(this.publishDocsCommands) + + ", publishDocsCommand=" + this.publishDocsCommand + "generateReleaseTrainDocsCommand='" + this.generateReleaseTrainDocsCommand + '\'' + ", waitTimeInMinutes=" + this.waitTimeInMinutes + '}'; @@ -1093,8 +1097,7 @@ public class ReleaserProperties implements Serializable { * be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot * version and "{{oldVersion}}" with the version before version updating. */ - private String[] publishDocsCommands = { "mkdir -p target", - "echo \"{{version}}\"" }; + private String publishDocsCommand = "mkdir -p target && echo \"{{version}}\""; /** * Command to be executed to generate release train documentation. @@ -1113,10 +1116,12 @@ public class ReleaserProperties implements Serializable { */ private long waitTimeInMinutes = 20; + @Override public String getBuildCommand() { return this.buildCommand; } + @Override public void setBuildCommand(String buildCommand) { this.buildCommand = buildCommand; } @@ -1129,43 +1134,53 @@ public class ReleaserProperties implements Serializable { this.waitTimeInMinutes = waitTimeInMinutes; } + @Override public String getDeployCommand() { return this.deployCommand; } + @Override public void setDeployCommand(String deployCommand) { this.deployCommand = deployCommand; } + @Override public String getDeployGuidesCommand() { return this.deployGuidesCommand; } + @Override public void setDeployGuidesCommand(String deployGuidesCommand) { this.deployGuidesCommand = deployGuidesCommand; } - public String[] getPublishDocsCommands() { - return this.publishDocsCommands; + @Override + public String getPublishDocsCommand() { + return this.publishDocsCommand; } - public void setPublishDocsCommands(String[] publishDocsCommands) { - this.publishDocsCommands = publishDocsCommands; + @Override + public void setPublishDocsCommand(String publishDocsCommand) { + this.publishDocsCommand = publishDocsCommand; } + @Override public String getGenerateReleaseTrainDocsCommand() { return this.generateReleaseTrainDocsCommand; } + @Override public void setGenerateReleaseTrainDocsCommand( String generateReleaseTrainDocsCommand) { this.generateReleaseTrainDocsCommand = generateReleaseTrainDocsCommand; } + @Override public String getSystemProperties() { return this.systemProperties; } + @Override public void setSystemProperties(String systemProperties) { this.systemProperties = systemProperties; } @@ -1174,7 +1189,7 @@ public class ReleaserProperties implements Serializable { public String toString() { return "Bash{" + "buildCommand='" + this.buildCommand + '\'' + ", deployCommand='" + this.deployCommand + '\'' - + ", publishDocsCommands=" + Arrays.toString(this.publishDocsCommands) + + ", publishDocsCommands=" + this.publishDocsCommand + "generateReleaseTrainDocsCommand='" + this.generateReleaseTrainDocsCommand + '\'' + ", waitTimeInMinutes=" + this.waitTimeInMinutes + '}'; @@ -1237,8 +1252,7 @@ public class ReleaserProperties implements Serializable { * Command to be executed to publish documentation. If present "{{version}}" will * be replaced by the provided version. */ - private String[] publishDocsCommands = { - "./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}" }; + private String publishDocsCommand = "./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}"; /** * Command to be executed to generate release train documentation. @@ -1257,10 +1271,12 @@ public class ReleaserProperties implements Serializable { */ private long waitTimeInMinutes = 20; + @Override public String getBuildCommand() { return this.buildCommand; } + @Override public void setBuildCommand(String buildCommand) { this.buildCommand = buildCommand; } @@ -1273,43 +1289,53 @@ public class ReleaserProperties implements Serializable { this.waitTimeInMinutes = waitTimeInMinutes; } + @Override public String getDeployCommand() { return this.deployCommand; } + @Override public void setDeployCommand(String deployCommand) { this.deployCommand = deployCommand; } + @Override public String getDeployGuidesCommand() { return this.deployGuidesCommand; } + @Override public void setDeployGuidesCommand(String deployGuidesCommand) { this.deployGuidesCommand = deployGuidesCommand; } - public String[] getPublishDocsCommands() { - return this.publishDocsCommands; + @Override + public String getPublishDocsCommand() { + return this.publishDocsCommand; } - public void setPublishDocsCommands(String[] publishDocsCommands) { - this.publishDocsCommands = publishDocsCommands; + @Override + public void setPublishDocsCommand(String publishDocsCommand) { + this.publishDocsCommand = publishDocsCommand; } + @Override public String getGenerateReleaseTrainDocsCommand() { return this.generateReleaseTrainDocsCommand; } + @Override public void setGenerateReleaseTrainDocsCommand( String generateReleaseTrainDocsCommand) { this.generateReleaseTrainDocsCommand = generateReleaseTrainDocsCommand; } + @Override public String getSystemProperties() { return this.systemProperties; } + @Override public void setSystemProperties(String systemProperties) { this.systemProperties = systemProperties; } @@ -1339,7 +1365,7 @@ public class ReleaserProperties implements Serializable { .add("buildCommand='" + buildCommand + "'") .add("deployCommand='" + deployCommand + "'") .add("deployGuidesCommand='" + deployGuidesCommand + "'") - .add("publishDocsCommands=" + Arrays.toString(publishDocsCommands)) + .add("publishDocsCommands=" + publishDocsCommand) .add("generateReleaseTrainDocsCommand='" + generateReleaseTrainDocsCommand + "'") .add("systemProperties='" + systemProperties + "'") diff --git a/releaser-core/src/main/java/releaser/internal/ReleaserPropertiesUpdater.java b/releaser-core/src/main/java/releaser/internal/ReleaserPropertiesUpdater.java index b626b58a..d8633992 100644 --- a/releaser-core/src/main/java/releaser/internal/ReleaserPropertiesUpdater.java +++ b/releaser-core/src/main/java/releaser/internal/ReleaserPropertiesUpdater.java @@ -107,8 +107,8 @@ public class ReleaserPropertiesUpdater implements Closeable { commandCopy::setDeployCommand); overrideStringIfPresent(fromProject::getGenerateReleaseTrainDocsCommand, commandCopy::setGenerateReleaseTrainDocsCommand); - overrideArrayIfPresent(fromProject::getPublishDocsCommands, - commandCopy::setPublishDocsCommands); + overrideStringIfPresent(fromProject::getPublishDocsCommand, + commandCopy::setPublishDocsCommand); overrideStringIfPresent(fromProject::getDeployGuidesCommand, commandCopy::setDeployGuidesCommand); overrideStringIfPresent(fromProject::getSystemProperties, diff --git a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java index a0f2d229..b03554a7 100644 --- a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java +++ b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java @@ -189,9 +189,13 @@ public class ProjectCommandExecutor { public void publishDocs(ReleaserProperties properties, ProjectVersion originalVersion, ProjectVersion changedVersion) { try { - for (String command : new CommandPicker(properties).publishDocsCommands()) { + String providedCommand = new CommandPicker(properties) + .publishDocsCommand(originalVersion); + String[] providedCommands = StringUtils + .delimitedListToStringArray(providedCommand, "&&"); + for (String command : providedCommands) { command = replaceAllPlaceHolders(originalVersion, changedVersion, - command); + command.trim()); String[] commands = command.split(" "); runCommand(properties, commands); } @@ -379,14 +383,16 @@ class CommandPicker { return releaserProperties.getBash().getSystemProperties(); } - public String[] publishDocsCommands() { + public String publishDocsCommand(ProjectVersion version) { if (projectType == ProjectType.GRADLE) { - return releaserProperties.getGradle().getPublishDocsCommands(); + return mavenCommandWithSystemProps( + releaserProperties.getGradle().getPublishDocsCommand(), version); } else if (projectType == ProjectType.MAVEN) { - return releaserProperties.getMaven().getPublishDocsCommands(); + return mavenCommandWithSystemProps( + releaserProperties.getMaven().getPublishDocsCommand(), version); } - return releaserProperties.getBash().getPublishDocsCommands(); + return releaserProperties.getBash().getPublishDocsCommand(); } String systemPropertiesPlaceholder() { diff --git a/releaser-core/src/test/java/releaser/internal/project/ProjectCommandExecutorTests.java b/releaser-core/src/test/java/releaser/internal/project/ProjectCommandExecutorTests.java index d6188298..028d0d1f 100644 --- a/releaser-core/src/test/java/releaser/internal/project/ProjectCommandExecutorTests.java +++ b/releaser-core/src/test/java/releaser/internal/project/ProjectCommandExecutorTests.java @@ -425,8 +425,8 @@ public class ProjectCommandExecutorTests { @Test public void should_successfully_execute_a_publish_docs_command() throws Exception { ReleaserProperties properties = new ReleaserProperties(); - properties.getBash().setPublishDocsCommands(new String[] { "ls -al", - "echo {{version}} {{oldVersion}} {{nextVersion}}" }); + properties.getBash().setPublishDocsCommand( + "ls -al && echo {{version}} {{oldVersion}} {{nextVersion}}"); properties.setWorkingDir(tmpFile("/builder/resolved").getPath()); TestReleaserProcessExecutor executor = testExecutor(properties.getWorkingDir()); ProjectCommandExecutor builder = new ProjectCommandExecutor() { @@ -448,8 +448,8 @@ public class ProjectCommandExecutorTests { public void should_successfully_execute_a_publish_docs_command_with_sys_props_placeholder() throws Exception { ReleaserProperties properties = new ReleaserProperties(); - properties.getBash().setPublishDocsCommands( - new String[] { "echo {{systemProps}} 1", "echo {{systemProps}} 2" }); + properties.getBash().setPublishDocsCommand( + "echo {{systemProps}} 1 && echo {{systemProps}} 2"); properties.getBash().setSystemProperties("-Dhello=world -Dfoo=bar"); properties.setWorkingDir(tmpFile("/builder/resolved").getPath()); TestReleaserProcessExecutor executor = testExecutor(properties.getWorkingDir()); @@ -463,8 +463,9 @@ public class ProjectCommandExecutorTests { builder.publishDocs(properties, original(), new ProjectVersion("foo", "Finchley.RELEASE")); - then(asString(tmpFile("/builder/resolved/resolved.log"))) - .contains("-Dhello=world -Dfoo=bar 2"); + String s = asString(tmpFile("/builder/resolved/resolved.log")); + System.out.println("====> " + s); + then(s).contains("-Dhello=world -Dfoo=bar 2"); then(executor.counter).isEqualTo(2); } @@ -472,8 +473,7 @@ public class ProjectCommandExecutorTests { public void should_successfully_execute_a_publish_docs_command_and_substitute_the_version() throws Exception { ReleaserProperties properties = new ReleaserProperties(); - properties.getBash() - .setPublishDocsCommands(new String[] { "echo '{{version}}'" }); + properties.getBash().setPublishDocsCommand("echo '{{version}}'"); properties.setWorkingDir(tmpFile("/builder/resolved").getPath()); TestReleaserProcessExecutor executor = testExecutor(properties.getWorkingDir()); ProjectCommandExecutor builder = new ProjectCommandExecutor() { @@ -515,8 +515,7 @@ public class ProjectCommandExecutorTests { @Test public void should_throw_exception_when_publish_docs_command_took_too_long_to_execute() { ReleaserProperties properties = new ReleaserProperties(); - properties.getBash() - .setPublishDocsCommands(new String[] { "sleep 1", "sleep 1" }); + properties.getBash().setPublishDocsCommand("sleep 1 && sleep 1"); properties.getBash().setWaitTimeInMinutes(0); properties.setWorkingDir(tmpFile("/builder/unresolved").getPath()); ProjectCommandExecutor builder = projectBuilder(properties); diff --git a/releaser-core/src/test/resources/application.yml b/releaser-core/src/test/resources/application.yml index 1f2b11d8..e75dd10c 100644 --- a/releaser-core/src/test/resources/application.yml +++ b/releaser-core/src/test/resources/application.yml @@ -62,11 +62,7 @@ releaser: build-command: "./mvnw clean install -B -Pdocs {{systemProps}}" deploy-command: "./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}}" deploy-guides-command: "./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}}" - publish-docs-commands: - - "mkdir -p target" - - "wget https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/ghpages.sh -O target/gh-pages.sh" - - "chmod +x target/gh-pages.sh" - - "./target/gh-pages.sh -v {{version}} -c" + publish-docs-command: "mkdir -p target && wget https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/ghpages.sh -O target/gh-pages.sh && chmod +x target/gh-pages.sh && ./target/gh-pages.sh -v {{version}} -c" generate-release-train-docs-command: "bash release_train.sh --retrieveversions --version {{version}} --ghpages --auto" system-properties: "" wait-time-in-minutes: 20 @@ -74,8 +70,7 @@ releaser: build-command: 'echo "{{systemProps}}"' deploy-command: 'echo "{{systemProps}}"' deploy-guides-command: 'echo "{{systemProps}}"' - publish-docs-commands: - - 'echo "{{systemProps}}"' + publish-docs-command: 'echo "{{systemProps}}"' generate-release-train-docs-command: 'echo "{{systemProps}}"' system-properties: "" wait-time-in-minutes: 20 @@ -94,8 +89,7 @@ releaser: build-command: "./gradlew clean build publishToMavenLocal --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}" deploy-command: "./gradlew publish --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}" deploy-guides-command: "./gradlew clean build deployGuides --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}" - publish-docs-commands: - - "echo 'TODO'" + publish-docs-command: "echo 'TODO'" generate-release-train-docs-command: "echo 'TODO'" system-properties: "" wait-time-in-minutes: 20 diff --git a/releaser-test/src/main/java/releaser/internal/spring/ArgsBuilder.java b/releaser-test/src/main/java/releaser/internal/spring/ArgsBuilder.java index 43a470e1..b26c6005 100644 --- a/releaser-test/src/main/java/releaser/internal/spring/ArgsBuilder.java +++ b/releaser-test/src/main/java/releaser/internal/spring/ArgsBuilder.java @@ -50,7 +50,7 @@ public class ArgsBuilder { "releaser.maven.build-command=echo build", "releaser.maven.deploy-command=echo deploy", "releaser.maven.deploy-guides-command=echo guides", - "releaser.maven.publish-docs-commands=echo docs", + "releaser.maven.publish-docs-command=echo docs", "releaser.maven.generate-release-train-docs-command=echo releaseTrainDocs", "releaser.working-dir=" + project.getPath(), "releaser.git.spring-project-url=" + tmpFile("spring-cloud").getAbsolutePath() + "/", @@ -113,8 +113,8 @@ public class ArgsBuilder { } public ArgsBuilder mavenPublishCommand(String command) throws Exception { - removeIfPresent("releaser.maven.publish-docs-commands"); - this.args.add("releaser.maven.publish-docs-commands=" + command); + removeIfPresent("releaser.maven.publish-docs-command"); + this.args.add("releaser.maven.publish-docs-command=" + command); return this; } From e78521244e36f1dd8190875f321fc0804fa3dbf3 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Sun, 19 Jul 2020 16:52:09 +0200 Subject: [PATCH 2/9] Polishing GH-195 - fix toString() methods to reflect change from plural to singular" --- .../main/java/releaser/internal/ReleaserProperties.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java b/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java index 8c0fa01c..3cce5625 100644 --- a/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java +++ b/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java @@ -253,9 +253,9 @@ public class ReleaserProperties implements Serializable { String getPublishDocsCommand(); /** - * @param publishDocsCommands to set + * @param publishDocsCommand to set */ - void setPublishDocsCommand(String publishDocsCommands); + void setPublishDocsCommand(String publishDocsCommand); /** * @return generate release train docs command @@ -1189,7 +1189,7 @@ public class ReleaserProperties implements Serializable { public String toString() { return "Bash{" + "buildCommand='" + this.buildCommand + '\'' + ", deployCommand='" + this.deployCommand + '\'' - + ", publishDocsCommands=" + this.publishDocsCommand + + ", publishDocsCommand=" + this.publishDocsCommand + "generateReleaseTrainDocsCommand='" + this.generateReleaseTrainDocsCommand + '\'' + ", waitTimeInMinutes=" + this.waitTimeInMinutes + '}'; @@ -1365,7 +1365,7 @@ public class ReleaserProperties implements Serializable { .add("buildCommand='" + buildCommand + "'") .add("deployCommand='" + deployCommand + "'") .add("deployGuidesCommand='" + deployGuidesCommand + "'") - .add("publishDocsCommands=" + publishDocsCommand) + .add("publishDocsCommand=" + publishDocsCommand) .add("generateReleaseTrainDocsCommand='" + generateReleaseTrainDocsCommand + "'") .add("systemProperties='" + systemProperties + "'") From 3f4864305929ce4e05cc8ab077ae95e303775ff2 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Mon, 20 Jul 2020 15:33:55 +0200 Subject: [PATCH 3/9] Add additional logging for docs publishing --- .../java/releaser/internal/project/ProjectCommandExecutor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java index b03554a7..4ad46732 100644 --- a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java +++ b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java @@ -191,6 +191,7 @@ public class ProjectCommandExecutor { try { String providedCommand = new CommandPicker(properties) .publishDocsCommand(originalVersion); + log.info("Executing command(s) for publishing docs " + providedCommand); String[] providedCommands = StringUtils .delimitedListToStringArray(providedCommand, "&&"); for (String command : providedCommands) { From 5ee85187bf204ead4995fd91d52edfce6645adb6 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Mon, 20 Jul 2020 15:36:25 +0200 Subject: [PATCH 4/9] Add additional logging for docs publishing --- .../java/releaser/internal/project/ProjectCommandExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java index 4ad46732..fbc3f01f 100644 --- a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java +++ b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java @@ -191,7 +191,7 @@ public class ProjectCommandExecutor { try { String providedCommand = new CommandPicker(properties) .publishDocsCommand(originalVersion); - log.info("Executing command(s) for publishing docs " + providedCommand); + log.info("Executing command(s) for publishing docs " + providedCommand + " / " + properties); String[] providedCommands = StringUtils .delimitedListToStringArray(providedCommand, "&&"); for (String command : providedCommands) { From afb2e43ed4fd799640cc38b63f096df8297bb8bb Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Fri, 31 Jul 2020 16:08:11 +0200 Subject: [PATCH 5/9] Polish cherry-picks from master --- .../src/main/java/releaser/internal/ReleaserProperties.java | 1 - .../releaser/internal/project/ProjectCommandExecutor.java | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java b/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java index 3cce5625..0c04243b 100644 --- a/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java +++ b/releaser-core/src/main/java/releaser/internal/ReleaserProperties.java @@ -961,7 +961,6 @@ public class ReleaserProperties implements Serializable { **/ private String deployGuidesCommand = "./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}}"; - private String publishDocsCommand = "./mvnw deploy -DskipTests -B -Pfast,deploy,docs -pl docs {{systemProps}}"; /** diff --git a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java index fbc3f01f..ea19aa2b 100644 --- a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java +++ b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java @@ -190,8 +190,9 @@ public class ProjectCommandExecutor { ProjectVersion changedVersion) { try { String providedCommand = new CommandPicker(properties) - .publishDocsCommand(originalVersion); - log.info("Executing command(s) for publishing docs " + providedCommand + " / " + properties); + .publishDocsCommand(changedVersion); + log.info("Executing command(s) for publishing docs " + providedCommand + " / " + + properties); String[] providedCommands = StringUtils .delimitedListToStringArray(providedCommand, "&&"); for (String command : providedCommands) { From 96c2d18699ba59c497eb6009fcccd583ba311319 Mon Sep 17 00:00:00 2001 From: spencergibb Date: Mon, 3 Aug 2020 15:18:24 -0400 Subject: [PATCH 6/9] Ignores .sdkmanrc --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1307091b..d6fb2de1 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ nbdist/ *.log _site effective.pom +.sdkmanrc From 84a3d1111c02a601e51698dc87a031e6f16e1fca Mon Sep 17 00:00:00 2001 From: spencergibb Date: Mon, 3 Aug 2020 15:19:03 -0400 Subject: [PATCH 7/9] temporarily removes updateWithVersions() call in generateReleaseTrainDocumentation() --- .../java/releaser/internal/postrelease/PostReleaseActions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java b/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java index 4eebdf05..9c8b972b 100644 --- a/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java +++ b/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java @@ -321,7 +321,7 @@ public class PostReleaseActions implements Closeable { .cloneReleaseTrainDocumentationProject(releaseTrain.releaseTagName()); ReleaserProperties projectProps = projectProps(file); String releaseTrainVersion = releaseTrain.version; - updateWithVersions(file, projects); + //updateWithVersions(file, projects); this.projectCommandExecutor.generateReleaseTrainDocs(projectProps, releaseTrainVersion, file.getAbsolutePath()); return ExecutionResult.success(); From 13091b0cf6a014fff702b642fef7d6f4dc32e00c Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 4 Aug 2020 19:25:17 +0200 Subject: [PATCH 8/9] Removed the tasks related to updating project documentation repo --- ...ustomProjectDocumentationUpdaterTests.java | 82 ------------------- .../SpringMetaReleaseAcceptanceTests.java | 41 +++------- .../SpringSingleProjectAcceptanceTests.java | 33 +------- .../main/java/releaser/internal/Releaser.java | 33 -------- .../internal/docs/DocumentationUpdater.java | 30 ------- .../docs/ProjectDocumentationUpdater.java | 4 + .../postrelease/PostReleaseActions.java | 2 +- .../PostReleaseTasksConfiguration.java | 16 ---- ...eDocsRepositoryProjectPostReleaseTask.java | 69 ---------------- ...ateDocsRepositoryTrainPostReleaseTask.java | 69 ---------------- .../spring/AbstractSpringAcceptanceTests.java | 38 --------- ...tractSpringMetaReleaseAcceptanceTests.java | 14 ---- 12 files changed, 20 insertions(+), 411 deletions(-) delete mode 100644 releaser-spring/src/main/java/releaser/internal/tasks/postrelease/UpdateDocsRepositoryProjectPostReleaseTask.java delete mode 100644 releaser-spring/src/main/java/releaser/internal/tasks/postrelease/UpdateDocsRepositoryTrainPostReleaseTask.java diff --git a/projects/spring-cloud/src/test/java/releaser/cloud/docs/SpringCloudCustomProjectDocumentationUpdaterTests.java b/projects/spring-cloud/src/test/java/releaser/cloud/docs/SpringCloudCustomProjectDocumentationUpdaterTests.java index 5ff6cf8c..bf7dcf57 100644 --- a/projects/spring-cloud/src/test/java/releaser/cloud/docs/SpringCloudCustomProjectDocumentationUpdaterTests.java +++ b/projects/spring-cloud/src/test/java/releaser/cloud/docs/SpringCloudCustomProjectDocumentationUpdaterTests.java @@ -43,8 +43,6 @@ import releaser.internal.template.TemplateGenerator; import org.springframework.util.FileSystemUtils; -import static org.assertj.core.api.BDDAssertions.then; - /** * @author Marcin Grzejszczak */ @@ -81,18 +79,6 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests { SpringCloudGithubIssuesAccessor.springCloud(this.properties))); } - @Test - public void should_not_update_current_version_in_the_docs_if_current_release_is_not_ga_or_sr() { - ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release", - "Angel.M7"); - ReleaserProperties properties = SpringCloudReleaserProperties.get(); - - File updatedDocs = projectDocumentationUpdater(properties) - .updateDocsRepo(projects(), releaseTrainVersion, "vAngel.M7"); - - then(updatedDocs).isNull(); - } - @NotNull private DocumentationUpdater projectDocumentationUpdater( ReleaserProperties properties) { @@ -214,74 +200,6 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests { .isNotEqualTo("Angel.SR33"); } - @Test - public void should_update_current_version_in_the_docs_if_current_release_starts_with_v_and_then_higher_letter_than_the_stored_release() - throws IOException { - ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release", - "Finchley.SR33"); - ReleaserProperties properties = new ReleaserProperties(); - properties.getGit().setUpdateDocumentationRepo(true); - properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString()); - - File updatedDocs = projectDocumentationUpdater(properties) - .updateDocsRepo(projects(), releaseTrainVersion, "vFinchley.SR33"); - - BDDAssertions.then(new File(updatedDocs, "current/index.html").toPath()) - .doesNotExist(); - Path current = new File(updatedDocs, "current/").toPath(); - BDDAssertions.then(current).isSymbolicLink(); - BDDAssertions.then(Files.readSymbolicLink(current).toString()) - .isEqualTo("Finchley.SR33"); - } - - @Test - public void should_update_current_version_in_the_docs_if_current_release_starts_with_higher_letter_than_the_stored_release() - throws IOException { - ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release", - "Finchley.SR33"); - ReleaserProperties properties = new ReleaserProperties(); - properties.getGit().setUpdateDocumentationRepo(true); - properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString()); - - DocumentationUpdater updater = projectDocumentationUpdater(properties); - ProjectVersion sleuthVersion = new ProjectVersion("spring-cloud-sleuth", - "2.0.0.RELEASE"); - Projects bom = new Projects(sleuthVersion); - File updatedDocs = updater.updateDocsRepo(bom, releaseTrainVersion, - "vFinchley.SR33"); - - BDDAssertions.then(new File(updatedDocs, "current/index.html").toPath()) - .doesNotExist(); - Path current = new File(updatedDocs, "current/").toPath(); - BDDAssertions.then(current).isSymbolicLink(); - BDDAssertions.then(Files.readSymbolicLink(current).toString()) - .isEqualTo("Finchley.SR33"); - - updatedDocs = updater.updateDocsRepoForSingleProject(bom, sleuthVersion); - - BDDAssertions.then( - new File(updatedDocs, "spring-cloud-sleuth/current/index.html").toPath()) - .doesNotExist(); - current = new File(updatedDocs, "spring-cloud-sleuth/current/").toPath(); - BDDAssertions.then(current).isSymbolicLink(); - BDDAssertions.then(Files.readSymbolicLink(current).toString()) - .isEqualTo("2.0.0.RELEASE"); - } - - @Test - public void should_not_update_current_version_in_the_docs_if_switch_is_off() { - ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release", - "Finchley.SR33"); - ReleaserProperties properties = new ReleaserProperties(); - properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString()); - properties.getGit().setUpdateDocumentationRepo(false); - - File updatedDocs = projectDocumentationUpdater(properties) - .updateDocsRepo(projects(), releaseTrainVersion, "Finchley.SR33"); - - then(updatedDocs).isNull(); - } - private File file(String relativePath) throws URISyntaxException { return new File(SpringCloudCustomProjectDocumentationUpdater.class .getResource(relativePath).toURI()); diff --git a/projects/spring-cloud/src/test/java/releaser/cloud/spring/meta/SpringMetaReleaseAcceptanceTests.java b/projects/spring-cloud/src/test/java/releaser/cloud/spring/meta/SpringMetaReleaseAcceptanceTests.java index df06c48e..9fafc02c 100644 --- a/projects/spring-cloud/src/test/java/releaser/cloud/spring/meta/SpringMetaReleaseAcceptanceTests.java +++ b/projects/spring-cloud/src/test/java/releaser/cloud/spring/meta/SpringMetaReleaseAcceptanceTests.java @@ -19,17 +19,14 @@ package releaser.cloud.spring.meta; import java.io.File; import java.util.Collections; import java.util.LinkedHashMap; -import java.util.List; import java.util.Map; import org.junit.Test; import org.mockito.BDDMockito; import releaser.internal.Releaser; import releaser.internal.ReleaserProperties; -import releaser.internal.docs.CustomProjectDocumentationUpdater; import releaser.internal.docs.DocumentationUpdater; import releaser.internal.git.GitTestUtils; -import releaser.internal.git.ProjectGitHandler; import releaser.internal.options.OptionsBuilder; import releaser.internal.postrelease.PostReleaseActions; import releaser.internal.project.Projects; @@ -44,9 +41,7 @@ import releaser.internal.tasks.composite.ReleaseCompositeTask; import releaser.internal.tasks.release.BuildProjectReleaseTask; import releaser.internal.tech.BuildUnstableException; import releaser.internal.tech.ExecutionResult; -import releaser.internal.template.TemplateGenerator; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -86,8 +81,6 @@ public class SpringMetaReleaseAcceptanceTests NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context .getBean(NonAssertingTestProjectGitHandler.class); SaganUpdater saganUpdater = context.getBean(SaganUpdater.class); - TestDocumentationUpdater testDocumentationUpdater = context - .getBean(TestDocumentationUpdater.class); PostReleaseActions postReleaseActions = context .getBean(PostReleaseActions.class); TestExecutionResultHandler testExecutionResultHandler = context @@ -101,13 +94,12 @@ public class SpringMetaReleaseAcceptanceTests then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue(); then(result.isFailureOrUnstable()).isFalse(); - // consul, release, documentation - then(nonAssertingTestProjectGitHandler.clonedProjects).hasSize(3); + // consul, release + then(nonAssertingTestProjectGitHandler.clonedProjects).hasSize(2); // don't want to verify the docs thenAllStepsWereExecutedForEachProject( nonAssertingTestProjectGitHandler); thenSaganWasCalled(saganUpdater); - thenDocumentationWasUpdated(testDocumentationUpdater); then(clonedProject(nonAssertingTestProjectGitHandler, "spring-cloud-consul").tagList().call()).extracting("name") .contains("refs/tags/v5.3.5.RELEASE"); @@ -136,8 +128,8 @@ public class SpringMetaReleaseAcceptanceTests NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context .getBean(NonAssertingTestProjectGitHandler.class); SaganUpdater saganUpdater = context.getBean(SaganUpdater.class); - TestDocumentationUpdater testDocumentationUpdater = context - .getBean(TestDocumentationUpdater.class); + DocumentationUpdater testDocumentationUpdater = context + .getBean(DocumentationUpdater.class); PostReleaseActions postReleaseActions = context .getBean(PostReleaseActions.class); TestExecutionResultHandler testExecutionResultHandler = context @@ -158,7 +150,6 @@ public class SpringMetaReleaseAcceptanceTests // thenAllStepsWereExecutedForEachProject( // nonAssertingTestProjectGitHandler); thenSaganWasCalled(saganUpdater); - thenDocumentationWasUpdated(testDocumentationUpdater); then(clonedProject(nonAssertingTestProjectGitHandler, "spring-cloud-consul").tagList().call()).extracting("name") .contains("refs/tags/v5.3.5.RELEASE"); @@ -185,8 +176,8 @@ public class SpringMetaReleaseAcceptanceTests NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context .getBean(NonAssertingTestProjectGitHandler.class); SaganUpdater saganUpdater = context.getBean(SaganUpdater.class); - TestDocumentationUpdater testDocumentationUpdater = context - .getBean(TestDocumentationUpdater.class); + DocumentationUpdater testDocumentationUpdater = context + .getBean(DocumentationUpdater.class); PostReleaseActions postReleaseActions = context .getBean(PostReleaseActions.class); TestExecutionResultHandler testExecutionResultHandler = context @@ -206,7 +197,6 @@ public class SpringMetaReleaseAcceptanceTests thenAllDryRunStepsWereExecutedForEachProject( nonAssertingTestProjectGitHandler); thenSaganWasNotCalled(saganUpdater); - thenDocumentationWasNotUpdated(testDocumentationUpdater); then(clonedProject(nonAssertingTestProjectGitHandler, "spring-cloud-consul").tagList().call()).extracting("name") .doesNotContain("refs/tags/v5.3.5.RELEASE"); @@ -274,8 +264,8 @@ public class SpringMetaReleaseAcceptanceTests BuildProjectReleaseTask build = context .getBean(BuildProjectReleaseTask.class); SaganUpdater saganUpdater = context.getBean(SaganUpdater.class); - TestDocumentationUpdater testDocumentationUpdater = context - .getBean(TestDocumentationUpdater.class); + DocumentationUpdater testDocumentationUpdater = context + .getBean(DocumentationUpdater.class); TestExecutionResultHandler testExecutionResultHandler = context .getBean(TestExecutionResultHandler.class); @@ -295,7 +285,6 @@ public class SpringMetaReleaseAcceptanceTests // post release thenSaganWasCalled(saganUpdater); - thenDocumentationWasUpdated(testDocumentationUpdater); thenWikiPageWasUpdated(testDocumentationUpdater); }); } @@ -321,8 +310,8 @@ public class SpringMetaReleaseAcceptanceTests BuildProjectReleaseTask build = context .getBean(BuildProjectReleaseTask.class); SaganUpdater saganUpdater = context.getBean(SaganUpdater.class); - TestDocumentationUpdater testDocumentationUpdater = context - .getBean(TestDocumentationUpdater.class); + DocumentationUpdater testDocumentationUpdater = context + .getBean(DocumentationUpdater.class); TestExecutionResultHandler testExecutionResultHandler = context .getBean(TestExecutionResultHandler.class); @@ -342,7 +331,6 @@ public class SpringMetaReleaseAcceptanceTests // post release thenSaganWasCalled(saganUpdater); - thenDocumentationWasUpdated(testDocumentationUpdater); thenWikiPageWasUpdated(testDocumentationUpdater); }); } @@ -492,13 +480,8 @@ public class SpringMetaReleaseAcceptanceTests } @Bean - TestDocumentationUpdater testDocumentationUpdater( - ProjectGitHandler projectGitHandler, - ReleaserProperties releaserProperties, - TemplateGenerator templateGenerator, @Autowired( - required = false) List updaters) { - return BDDMockito.spy(new TestDocumentationUpdater(projectGitHandler, - releaserProperties, templateGenerator, updaters)); + DocumentationUpdater testDocumentationUpdater() { + return BDDMockito.mock(DocumentationUpdater.class); } } diff --git a/projects/spring-cloud/src/test/java/releaser/cloud/spring/single/SpringSingleProjectAcceptanceTests.java b/projects/spring-cloud/src/test/java/releaser/cloud/spring/single/SpringSingleProjectAcceptanceTests.java index d8f33802..35d0b772 100644 --- a/projects/spring-cloud/src/test/java/releaser/cloud/spring/single/SpringSingleProjectAcceptanceTests.java +++ b/projects/spring-cloud/src/test/java/releaser/cloud/spring/single/SpringSingleProjectAcceptanceTests.java @@ -17,10 +17,8 @@ package releaser.cloud.spring.single; import java.io.File; -import java.nio.file.Files; import java.util.Collections; import java.util.Iterator; -import java.util.List; import org.assertj.core.api.BDDAssertions; import org.eclipse.jgit.revwalk.RevCommit; @@ -28,9 +26,8 @@ import org.junit.Test; import org.mockito.BDDMockito; import releaser.cloud.spring.AbstractSpringCloudAcceptanceTests; import releaser.internal.ReleaserProperties; -import releaser.internal.docs.CustomProjectDocumentationUpdater; +import releaser.internal.docs.DocumentationUpdater; import releaser.internal.git.GitTestUtils; -import releaser.internal.git.ProjectGitHandler; import releaser.internal.github.ProjectGitHubHandler; import releaser.internal.options.OptionsBuilder; import releaser.internal.postrelease.PostReleaseActions; @@ -40,9 +37,7 @@ import releaser.internal.sagan.SaganClient; import releaser.internal.spring.ArgsBuilder; import releaser.internal.spring.SpringReleaser; import releaser.internal.tech.ExecutionResult; -import releaser.internal.template.TemplateGenerator; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -108,8 +103,6 @@ public class SpringSingleProjectAcceptanceTests TestProjectGitHubHandler gitHubHandler = context .getBean(TestProjectGitHubHandler.class); SaganClient saganClient = context.getBean(SaganClient.class); - TestDocumentationUpdater testDocumentationUpdater = context - .getBean(TestDocumentationUpdater.class); PostReleaseActions postReleaseActions = context .getBean(PostReleaseActions.class); TestExecutionResultHandler testExecutionResultHandler = context @@ -141,10 +134,6 @@ public class SpringSingleProjectAcceptanceTests .deleteRelease("spring-cloud-consul", "2.1.2.BUILD-SNAPSHOT"); then(gitHubHandler.issueCreatedInSpringGuides).isFalse(); then(gitHubHandler.issueCreatedInStartSpringIo).isFalse(); - then(Files.readSymbolicLink( - new File(testDocumentationUpdater.getDocumentationRepo(), - "spring-cloud-consul/current").toPath()) - .toString()).isEqualTo("2.1.2.RELEASE"); thenRunUpdatedTestsWereNotCalled(postReleaseActions); // print results @@ -172,8 +161,6 @@ public class SpringSingleProjectAcceptanceTests TestProjectGitHubHandler gitHubHandler = context .getBean(TestProjectGitHubHandler.class); SaganClient saganClient = context.getBean(SaganClient.class); - TestDocumentationUpdater testDocumentationUpdater = context - .getBean(TestDocumentationUpdater.class); PostReleaseActions postReleaseActions = context .getBean(PostReleaseActions.class); TestExecutionResultHandler testExecutionResultHandler = context @@ -207,10 +194,6 @@ public class SpringSingleProjectAcceptanceTests .deleteRelease("spring-cloud-build", "2.1.6.BUILD-SNAPSHOT"); then(gitHubHandler.issueCreatedInSpringGuides).isFalse(); then(gitHubHandler.issueCreatedInStartSpringIo).isFalse(); - then(Files.readSymbolicLink( - new File(testDocumentationUpdater.getDocumentationRepo(), - "spring-cloud-build/current").toPath()) - .toString()).isEqualTo("2.1.6.RELEASE"); thenRunUpdatedTestsWereNotCalled(postReleaseActions); // print results @@ -236,8 +219,6 @@ public class SpringSingleProjectAcceptanceTests TestProjectGitHubHandler gitHubHandler = context .getBean(TestProjectGitHubHandler.class); SaganClient saganClient = context.getBean(SaganClient.class); - TestDocumentationUpdater testDocumentationUpdater = context - .getBean(TestDocumentationUpdater.class); PostReleaseActions postReleaseActions = context .getBean(PostReleaseActions.class); TestExecutionResultHandler testExecutionResultHandler = context @@ -269,9 +250,6 @@ public class SpringSingleProjectAcceptanceTests // we update guides only for SR / RELEASE then(gitHubHandler.issueCreatedInSpringGuides).isFalse(); then(gitHubHandler.issueCreatedInStartSpringIo).isFalse(); - // haven't even checked out the branch - then(new File(testDocumentationUpdater.getDocumentationRepo(), - "current/index.html")).doesNotExist(); thenRunUpdatedTestsWereNotCalled(postReleaseActions); // print results @@ -397,13 +375,8 @@ public class SpringSingleProjectAcceptanceTests } @Bean - TestDocumentationUpdater testDocumentationUpdater( - ProjectGitHandler projectGitHandler, - ReleaserProperties releaserProperties, - TemplateGenerator templateGenerator, @Autowired( - required = false) List updaters) { - return new TestDocumentationUpdater(projectGitHandler, releaserProperties, - templateGenerator, updaters); + DocumentationUpdater testDocumentationUpdater() { + return BDDMockito.mock(DocumentationUpdater.class); } } diff --git a/releaser-core/src/main/java/releaser/internal/Releaser.java b/releaser-core/src/main/java/releaser/internal/Releaser.java index 1bf84860..859abba4 100644 --- a/releaser-core/src/main/java/releaser/internal/Releaser.java +++ b/releaser-core/src/main/java/releaser/internal/Releaser.java @@ -388,39 +388,6 @@ public class Releaser { } } - public ExecutionResult updateDocumentationRepositoryForTrain( - ReleaserProperties properties, Projects projects, - ProjectVersion releaseVersion) { - String releaseBranch = properties.getPom().getBranch(); - File file = this.documentationUpdater.updateDocsRepo(projects, releaseVersion, - releaseBranch); - if (file != null) { - log.info( - "\nSuccessfully updated documentation repository for train branch [{}]", - releaseBranch); - return ExecutionResult.success(); - } - return ExecutionResult.skipped(); - } - - public ExecutionResult updateDocumentationRepositoryForSingleProject( - Projects projects, ProjectVersion releaseVersion) { - if (releaseVersion.projectName - .equals(projects.releaseTrain(this.releaserProperties).projectName)) { - log.info("Will not update documentation for project that is a BOM project"); - return ExecutionResult.skipped(); - } - File file = this.documentationUpdater.updateDocsRepoForSingleProject(projects, - releaseVersion); - if (file != null) { - log.info( - "\nSuccessfully updated documentation repository for a project with name [{}]", - releaseVersion.projectName); - return ExecutionResult.success(); - } - return ExecutionResult.skipped(); - } - public ExecutionResult runUpdatedSamples(Projects projects) { return this.postReleaseActions.runUpdatedTests(projects); } diff --git a/releaser-core/src/main/java/releaser/internal/docs/DocumentationUpdater.java b/releaser-core/src/main/java/releaser/internal/docs/DocumentationUpdater.java index 34db77ef..c347e938 100644 --- a/releaser-core/src/main/java/releaser/internal/docs/DocumentationUpdater.java +++ b/releaser-core/src/main/java/releaser/internal/docs/DocumentationUpdater.java @@ -21,7 +21,6 @@ import java.util.List; import releaser.internal.ReleaserProperties; import releaser.internal.git.ProjectGitHandler; -import releaser.internal.project.ProjectVersion; import releaser.internal.project.Projects; import releaser.internal.template.TemplateGenerator; @@ -49,35 +48,6 @@ public class DocumentationUpdater { this.releaseTrainContentsUpdater = contentsUpdater; } - /** - * Updates the documentation repository if current release train version is greater or - * equal than the one stored in the repo. - * @param projects list of projects with updated versions - * @param currentProject the project we're parsing - * @param bomReleaseBranch branch of the BOM - * @return {@link File cloned temporary directory} - {@code null} if wrong version is - * used - */ - public File updateDocsRepo(Projects projects, ProjectVersion currentProject, - String bomReleaseBranch) { - return this.projectDocumentationUpdater.updateDocsRepo(projects, currentProject, - bomReleaseBranch); - } - - /** - * Updates the documentation repository if current release train version is greater or - * equal than the one stored in the repo. - * @param projects list of projects with updated versions - * @param currentProject the project we're parsing - * @return {@link File cloned temporary directory} - {@code null} if wrong version is - * used - */ - public File updateDocsRepoForSingleProject(Projects projects, - ProjectVersion currentProject) { - return this.projectDocumentationUpdater.updateDocsRepoForSingleProject(projects, - currentProject); - } - /** * Updates the release train wiki page. * @param projects list of projects to update versions for diff --git a/releaser-core/src/main/java/releaser/internal/docs/ProjectDocumentationUpdater.java b/releaser-core/src/main/java/releaser/internal/docs/ProjectDocumentationUpdater.java index 81252de4..3d0262e9 100644 --- a/releaser-core/src/main/java/releaser/internal/docs/ProjectDocumentationUpdater.java +++ b/releaser-core/src/main/java/releaser/internal/docs/ProjectDocumentationUpdater.java @@ -48,6 +48,8 @@ class ProjectDocumentationUpdater { this.updaters = updaters; } + // Not needed any more cause all projects publish to docs.spring.io + @Deprecated public File updateDocsRepo(Projects projects, ProjectVersion currentProject, String bomBranch) { if (!shouldUpdate(currentProject)) { @@ -61,6 +63,8 @@ class ProjectDocumentationUpdater { projects, bomBranch); } + // Not needed any more cause all projects publish to docs.spring.io + @Deprecated public File updateDocsRepoForSingleProject(Projects projects, ProjectVersion currentProject) { if (!shouldUpdate(currentProject)) { diff --git a/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java b/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java index 9c8b972b..6e7cdf2c 100644 --- a/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java +++ b/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java @@ -321,7 +321,7 @@ public class PostReleaseActions implements Closeable { .cloneReleaseTrainDocumentationProject(releaseTrain.releaseTagName()); ReleaserProperties projectProps = projectProps(file); String releaseTrainVersion = releaseTrain.version; - //updateWithVersions(file, projects); + // updateWithVersions(file, projects); this.projectCommandExecutor.generateReleaseTrainDocs(projectProps, releaseTrainVersion, file.getAbsolutePath()); return ExecutionResult.success(); diff --git a/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/PostReleaseTasksConfiguration.java b/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/PostReleaseTasksConfiguration.java index 41a28173..67739ce2 100644 --- a/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/PostReleaseTasksConfiguration.java +++ b/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/PostReleaseTasksConfiguration.java @@ -61,22 +61,6 @@ class PostReleaseTasksConfiguration { return new UpdateAllTestSamplesTrainPostReleaseTask(releaser); } - @Bean - @ConditionalOnMissingBean - @ConditionalOnProperty("releaser.git.update-documentation-repo") - UpdateDocsRepositoryProjectPostReleaseTask updateDocsRepositoryProjectPostReleaseTask( - Releaser releaser) { - return new UpdateDocsRepositoryProjectPostReleaseTask(releaser); - } - - @Bean - @ConditionalOnMissingBean - @ConditionalOnProperty("releaser.git.update-documentation-repo") - UpdateDocsRepositoryTrainPostReleaseTask updateDocsRepositoryTrainPostReleaseTask( - Releaser releaser) { - return new UpdateDocsRepositoryTrainPostReleaseTask(releaser); - } - @Bean @ConditionalOnMissingBean @ConditionalOnProperty("releaser.git.update-guides-repo") diff --git a/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/UpdateDocsRepositoryProjectPostReleaseTask.java b/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/UpdateDocsRepositoryProjectPostReleaseTask.java deleted file mode 100644 index eb430797..00000000 --- a/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/UpdateDocsRepositoryProjectPostReleaseTask.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2013-2019 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package releaser.internal.tasks.postrelease; - -import releaser.internal.Releaser; -import releaser.internal.spring.Arguments; -import releaser.internal.tasks.ProjectPostReleaseReleaserTask; -import releaser.internal.tech.ExecutionResult; - -public class UpdateDocsRepositoryProjectPostReleaseTask - implements ProjectPostReleaseReleaserTask { - - /** - * Order of this task. The higher value, the lower order. - */ - public static final int ORDER = 105; - - private final Releaser releaser; - - public UpdateDocsRepositoryProjectPostReleaseTask(Releaser releaser) { - this.releaser = releaser; - } - - @Override - public String name() { - return "updateDocumentationForProject"; - } - - @Override - public String shortName() { - return "udp"; - } - - @Override - public String header() { - return "UPDATE DOCUMENTATION FOR PROJECT"; - } - - @Override - public String description() { - return "Updating documentation repository for a single project"; - } - - @Override - public ExecutionResult runTask(Arguments args) { - return this.releaser.updateDocumentationRepositoryForSingleProject(args.projects, - args.versionFromBom); - } - - @Override - public int getOrder() { - return UpdateDocsRepositoryProjectPostReleaseTask.ORDER; - } - -} diff --git a/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/UpdateDocsRepositoryTrainPostReleaseTask.java b/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/UpdateDocsRepositoryTrainPostReleaseTask.java deleted file mode 100644 index 26881121..00000000 --- a/releaser-spring/src/main/java/releaser/internal/tasks/postrelease/UpdateDocsRepositoryTrainPostReleaseTask.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2013-2019 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package releaser.internal.tasks.postrelease; - -import releaser.internal.Releaser; -import releaser.internal.spring.Arguments; -import releaser.internal.tasks.TrainPostReleaseReleaserTask; -import releaser.internal.tech.ExecutionResult; - -public class UpdateDocsRepositoryTrainPostReleaseTask - implements TrainPostReleaseReleaserTask { - - /** - * Order of this task. The higher value, the lower order. - */ - public static final int ORDER = 110; - - private final Releaser releaser; - - public UpdateDocsRepositoryTrainPostReleaseTask(Releaser releaser) { - this.releaser = releaser; - } - - @Override - public String name() { - return "updateDocumentation"; - } - - @Override - public String shortName() { - return "ud"; - } - - @Override - public String header() { - return "UPDATE DOCUMENTATION FOR RELEASE TRAIN"; - } - - @Override - public String description() { - return "Updating documentation repository for a release train"; - } - - @Override - public ExecutionResult runTask(Arguments args) { - return this.releaser.updateDocumentationRepositoryForTrain(args.properties, - args.projects, args.versionFromBom); - } - - @Override - public int getOrder() { - return UpdateDocsRepositoryTrainPostReleaseTask.ORDER; - } - -} diff --git a/releaser-test/src/main/java/releaser/internal/spring/AbstractSpringAcceptanceTests.java b/releaser-test/src/main/java/releaser/internal/spring/AbstractSpringAcceptanceTests.java index fc4ddef3..72435549 100644 --- a/releaser-test/src/main/java/releaser/internal/spring/AbstractSpringAcceptanceTests.java +++ b/releaser-test/src/main/java/releaser/internal/spring/AbstractSpringAcceptanceTests.java @@ -42,18 +42,14 @@ import org.mockito.BDDMockito; import releaser.internal.ReleaserProperties; import releaser.internal.buildsystem.TestPomReader; import releaser.internal.buildsystem.TestUtils; -import releaser.internal.docs.CustomProjectDocumentationUpdater; -import releaser.internal.docs.DocumentationUpdater; import releaser.internal.git.GitTestUtils; import releaser.internal.git.ProjectGitHandler; import releaser.internal.options.Options; import releaser.internal.postrelease.PostReleaseActions; -import releaser.internal.project.ProjectVersion; import releaser.internal.project.Projects; import releaser.internal.sagan.Project; import releaser.internal.sagan.Release; import releaser.internal.tasks.ReleaserTask; -import releaser.internal.template.TemplateGenerator; import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; import org.springframework.batch.core.configuration.annotation.StepBuilderFactory; @@ -310,40 +306,6 @@ public abstract class AbstractSpringAcceptanceTests { } - public static class TestDocumentationUpdater extends DocumentationUpdater { - - private File documentationRepo; - - public TestDocumentationUpdater(ProjectGitHandler gitHandler, - ReleaserProperties properties, TemplateGenerator templateGenerator, - List updaters) { - super(gitHandler, properties, templateGenerator, updaters); - } - - @Override - public File updateDocsRepo(Projects projects, ProjectVersion currentProject, - String bomReleaseBranch) { - File documentationRepo = super.updateDocsRepo(projects, currentProject, - bomReleaseBranch); - this.documentationRepo = documentationRepo; - return documentationRepo; - } - - @Override - public File updateDocsRepoForSingleProject(Projects projects, - ProjectVersion currentProject) { - File documentationRepo = super.updateDocsRepoForSingleProject(projects, - currentProject); - this.documentationRepo = documentationRepo; - return documentationRepo; - } - - public File getDocumentationRepo() { - return documentationRepo; - } - - } - public static class TestExecutionResultHandler extends SpringBatchExecutionResultHandler { diff --git a/releaser-test/src/main/java/releaser/internal/spring/meta/AbstractSpringMetaReleaseAcceptanceTests.java b/releaser-test/src/main/java/releaser/internal/spring/meta/AbstractSpringMetaReleaseAcceptanceTests.java index 2b94d062..7cd5d863 100644 --- a/releaser-test/src/main/java/releaser/internal/spring/meta/AbstractSpringMetaReleaseAcceptanceTests.java +++ b/releaser-test/src/main/java/releaser/internal/spring/meta/AbstractSpringMetaReleaseAcceptanceTests.java @@ -24,7 +24,6 @@ import java.util.Map; import org.mockito.BDDMockito; import releaser.internal.ReleaserProperties; -import releaser.internal.docs.DocumentationUpdater; import releaser.internal.github.ProjectGitHubHandler; import releaser.internal.project.ProjectVersion; import releaser.internal.project.Projects; @@ -131,19 +130,6 @@ public abstract class AbstractSpringMetaReleaseAcceptanceTests BDDMockito.any(ProjectVersion.class), BDDMockito.any(Projects.class)); } - public void thenDocumentationWasUpdated(DocumentationUpdater documentationUpdater) { - BDDMockito.then(documentationUpdater).should().updateDocsRepo( - BDDMockito.any(Projects.class), BDDMockito.any(ProjectVersion.class), - BDDMockito.anyString()); - } - - public void thenDocumentationWasNotUpdated( - DocumentationUpdater documentationUpdater) { - BDDMockito.then(documentationUpdater).should(BDDMockito.never()).updateDocsRepo( - BDDMockito.any(Projects.class), BDDMockito.any(ProjectVersion.class), - BDDMockito.anyString()); - } - public static class NonAssertingTestProjectGitHubHandler extends ProjectGitHubHandler { From 21154c07c9875a33315ddf3f292b86aa19b2de44 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 4 Aug 2020 19:30:48 +0200 Subject: [PATCH 9/9] Removed commented code --- .../java/releaser/internal/postrelease/PostReleaseActions.java | 1 - 1 file changed, 1 deletion(-) diff --git a/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java b/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java index 6e7cdf2c..5ad340eb 100644 --- a/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java +++ b/releaser-core/src/main/java/releaser/internal/postrelease/PostReleaseActions.java @@ -321,7 +321,6 @@ public class PostReleaseActions implements Closeable { .cloneReleaseTrainDocumentationProject(releaseTrain.releaseTagName()); ReleaserProperties projectProps = projectProps(file); String releaseTrainVersion = releaseTrain.version; - // updateWithVersions(file, projects); this.projectCommandExecutor.generateReleaseTrainDocs(projectProps, releaseTrainVersion, file.getAbsolutePath()); return ExecutionResult.success();