diff --git a/src/main/java/io/quarkus/bot/release/step/CoreReleasePerform.java b/src/main/java/io/quarkus/bot/release/step/CoreReleasePerform.java new file mode 100644 index 0000000..f7886f9 --- /dev/null +++ b/src/main/java/io/quarkus/bot/release/step/CoreReleasePerform.java @@ -0,0 +1,24 @@ +package io.quarkus.bot.release.step; + +import java.io.IOException; + +import jakarta.inject.Singleton; + +import org.kohsuke.github.GHIssue; + +import io.quarkiverse.githubaction.Commands; +import io.quarkiverse.githubaction.Context; +import io.quarkus.arc.Unremovable; +import io.quarkus.bot.release.ReleaseInformation; +import io.quarkus.bot.release.util.UpdatedIssueBody; + +@Singleton +@Unremovable +public class CoreReleasePerform implements StepHandler { + + @Override + public int run(Context context, Commands commands, ReleaseInformation releaseInformation, GHIssue issue, + UpdatedIssueBody updatedIssueBody) throws IOException, InterruptedException { + throw new IllegalStateException("Testing error handling..."); + } +} diff --git a/src/main/java/io/quarkus/bot/release/step/CoreReleasePrepare.java b/src/main/java/io/quarkus/bot/release/step/CoreReleasePrepare.java index 502c0f8..536b85f 100644 --- a/src/main/java/io/quarkus/bot/release/step/CoreReleasePrepare.java +++ b/src/main/java/io/quarkus/bot/release/step/CoreReleasePrepare.java @@ -1,7 +1,9 @@ package io.quarkus.bot.release.step; import java.io.IOException; +import java.util.List; +import jakarta.inject.Inject; import jakarta.inject.Singleton; import org.kohsuke.github.GHIssue; @@ -10,15 +12,19 @@ import io.quarkiverse.githubaction.Context; import io.quarkus.arc.Unremovable; import io.quarkus.bot.release.ReleaseInformation; +import io.quarkus.bot.release.util.Processes; import io.quarkus.bot.release.util.UpdatedIssueBody; @Singleton @Unremovable public class CoreReleasePrepare implements StepHandler { + @Inject + Processes processes; + @Override public int run(Context context, Commands commands, ReleaseInformation releaseInformation, GHIssue issue, UpdatedIssueBody updatedIssueBody) throws IOException, InterruptedException { - throw new IllegalStateException("Testing error handling..."); + return processes.execute(List.of("./release-prepare.sh")); } } diff --git a/src/main/java/io/quarkus/bot/release/step/Step.java b/src/main/java/io/quarkus/bot/release/step/Step.java index 35d5cb2..bfa4c3e 100644 --- a/src/main/java/io/quarkus/bot/release/step/Step.java +++ b/src/main/java/io/quarkus/bot/release/step/Step.java @@ -4,8 +4,8 @@ public enum Step { PREREQUISITES("Prerequisites", Prerequisites.class, false, false), APPROVE_CORE_RELEASE("Approve the core release", ApproveCoreRelease.class, true, false), - CORE_RELEASE_PREPARE("Prepare the core release", CoreReleasePrepare.class, true, false); -// CORE_RELEASE_PERFORM("Perform the core release", true, false), + CORE_RELEASE_PREPARE("Prepare the core release", CoreReleasePrepare.class, true, false), + CORE_RELEASE_PERFORM("Perform the core release", CoreReleasePrepare.class, true, false); // SYNC_CORE_RELEASE_TO_MAVEN_CENTRAL("Sync core release to Maven Central", true, false), // RELEASE_GRADLE_PLUGIN("Release Gradle plugin", true, false), // POST_CORE_RELEASE("Execute post-core-release operations", true, false),