Skip to content

Commit

Permalink
Merge pull request #13 from gsmet/add-release-prepare
Browse files Browse the repository at this point in the history
Add release-prepare step
  • Loading branch information
gsmet committed Nov 25, 2023
2 parents a6ab112 + a4bd4ca commit 78aab0b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
24 changes: 24 additions & 0 deletions src/main/java/io/quarkus/bot/release/step/CoreReleasePerform.java
Original file line number Diff line number Diff line change
@@ -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...");
}
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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"));
}
}
4 changes: 2 additions & 2 deletions src/main/java/io/quarkus/bot/release/step/Step.java
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 78aab0b

Please sign in to comment.