diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index c78bf31cef..15013be62a 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -263,7 +263,9 @@ jobs: export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD" export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY" echo "Updating $REPO@$VERSION to next snapshot version." - ./gradlew updateToSnapshotVersion -Pcommit=true + ./gradlew :updateToSnapshotVersion + ./gradlew :spring-security-docs:antoraUpdateVersion + git commit -am "Next development version" git push notify_result: name: Check for failures diff --git a/buildSrc/src/main/java/org/springframework/security/convention/versions/UpdateProjectVersionPlugin.java b/buildSrc/src/main/java/org/springframework/security/convention/versions/UpdateProjectVersionPlugin.java index f26613aea5..f9041108b5 100644 --- a/buildSrc/src/main/java/org/springframework/security/convention/versions/UpdateProjectVersionPlugin.java +++ b/buildSrc/src/main/java/org/springframework/security/convention/versions/UpdateProjectVersionPlugin.java @@ -37,8 +37,7 @@ public class UpdateProjectVersionPlugin implements Plugin { public void execute(UpdateToSnapshotVersionTask updateToSnapshotVersionTask) { updateToSnapshotVersionTask.setGroup("Release"); updateToSnapshotVersionTask.setDescription( - "Updates the project version to the next snapshot in gradle.properties and optionally commits the changes"); - updateToSnapshotVersionTask.setCommit("true".equals(project.findProperty("commit"))); + "Updates the project version to the next snapshot in gradle.properties"); } }); } diff --git a/buildSrc/src/main/java/org/springframework/security/convention/versions/UpdateToSnapshotVersionTask.java b/buildSrc/src/main/java/org/springframework/security/convention/versions/UpdateToSnapshotVersionTask.java index f2c533d1fd..42caf5f971 100644 --- a/buildSrc/src/main/java/org/springframework/security/convention/versions/UpdateToSnapshotVersionTask.java +++ b/buildSrc/src/main/java/org/springframework/security/convention/versions/UpdateToSnapshotVersionTask.java @@ -18,12 +18,9 @@ package org.springframework.security.convention.versions; import org.gradle.api.DefaultTask; import org.gradle.api.Project; -import org.gradle.api.tasks.Input; -import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.TaskAction; import java.io.File; -import java.io.FileNotFoundException; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -31,10 +28,6 @@ public abstract class UpdateToSnapshotVersionTask extends DefaultTask { private static final String RELEASE_VERSION_PATTERN = "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-M\\d+|-RC\\d+)?$"; - @Input - @Optional - private Boolean commit; - @TaskAction public void updateToSnapshotVersion() { String currentVersion = getProject().getVersion().toString(); @@ -49,12 +42,6 @@ public abstract class UpdateToSnapshotVersionTask extends DefaultTask { gradlePropertiesText = gradlePropertiesText.replace("version=" + currentVersion, "version=" + nextVersion); return gradlePropertiesText; }); - if (this.commit) { - System.out.println("Committing the version update"); - File rootDir = getProject().getRootDir(); - String commitMessage = "Next development version"; - CommandLineUtils.runCommand(rootDir, "git", "commit", "-am", commitMessage); - } } private String calculateNextSnapshotVersion(String currentVersion) { @@ -78,12 +65,4 @@ public abstract class UpdateToSnapshotVersionTask extends DefaultTask { } } - public Boolean getCommit() { - return commit; - } - - public void setCommit(Boolean commit) { - this.commit = commit; - } - }