Introduce verify-local command to verify the local build setup required to release Spring Data.
Closes #50
This commit is contained in:
@@ -366,6 +366,17 @@ public class BuildOperations {
|
||||
buildSystem.withJavaVersion(executor.detectJavaVersion(project)).verify();
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies Maven staging authentication.
|
||||
*/
|
||||
public void verifyStagingAuthentication() {
|
||||
|
||||
Project project = Projects.BUILD;
|
||||
BuildSystem buildSystem = buildSystems.getRequiredPluginFor(project);
|
||||
|
||||
buildSystem.withJavaVersion(executor.detectJavaVersion(project)).verifyStagingAuthentication();
|
||||
}
|
||||
|
||||
/**
|
||||
* Selects the build system for the module contained in the given {@link ModuleIteration} and executes the given
|
||||
* function with it.
|
||||
|
||||
@@ -116,6 +116,11 @@ interface BuildSystem extends Plugin<Project> {
|
||||
*/
|
||||
void verify();
|
||||
|
||||
/**
|
||||
* Verify general functionality and correctness of the build setup.
|
||||
*/
|
||||
void verifyStagingAuthentication();
|
||||
|
||||
/**
|
||||
* Prepare the build system with a Java version.
|
||||
*
|
||||
|
||||
@@ -550,6 +550,12 @@ class MavenBuildSystem implements BuildSystem {
|
||||
.andIf(gpg.hasSecretKeyring(), () -> arg("gpg.secretKeyring").withValue(gpg.getSecretKeyring()));
|
||||
|
||||
mvn.execute(BUILD, arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verifyStagingAuthentication() {
|
||||
|
||||
logger.log(BUILD, "Verifying Maven Staging Authentication…");
|
||||
|
||||
mvn.execute(BUILD, CommandLine.of(goal("nexus-staging:rc-list-profiles"), //
|
||||
profile("central")));
|
||||
|
||||
@@ -60,6 +60,7 @@ class VerifyCommands extends TimedCommand {
|
||||
if (ObjectUtils.isEmpty(module) || "build".equals(module)) {
|
||||
// Maven interaction
|
||||
build.verify();
|
||||
build.verifyStagingAuthentication();
|
||||
}
|
||||
|
||||
if (ObjectUtils.isEmpty(module) || "deployment".equals(module)) {
|
||||
@@ -80,4 +81,22 @@ class VerifyCommands extends TimedCommand {
|
||||
logger.log("Verify", "All settings are verified. You can ship a release now.");
|
||||
}
|
||||
|
||||
@CliCommand("verify-local")
|
||||
public void verifyLocalReleaseTools() {
|
||||
|
||||
// Git checkout build
|
||||
git.verify();
|
||||
|
||||
// Maven interaction
|
||||
build.verify();
|
||||
|
||||
// GitHub verification
|
||||
github.verifyAuthentication();
|
||||
|
||||
// Projects Service Verification
|
||||
projectService.verifyAuthentication();
|
||||
|
||||
logger.log("Verify", "All local settings are verified. You can ship a release now.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user