@@ -16,7 +16,6 @@
|
||||
package org.springframework.data.release.cli;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import org.springframework.boot.SpringBootVersion;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
*/
|
||||
package org.springframework.data.release.cli;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import org.springframework.data.release.CliComponent;
|
||||
import org.springframework.data.release.TimedCommand;
|
||||
import org.springframework.data.release.build.BuildOperations;
|
||||
@@ -27,11 +32,6 @@ import org.springframework.shell.core.annotation.CliCommand;
|
||||
import org.springframework.shell.core.annotation.CliOption;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
/**
|
||||
* Commands to verify a correct Release Tools Setup.
|
||||
*
|
||||
@@ -42,48 +42,42 @@ import lombok.experimental.FieldDefaults;
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE, makeFinal = true)
|
||||
class VerifyCommands extends TimedCommand {
|
||||
|
||||
@NonNull
|
||||
GitOperations git;
|
||||
@NonNull
|
||||
GitHub github;
|
||||
@NonNull
|
||||
DeploymentOperations deployment;
|
||||
@NonNull
|
||||
BuildOperations build;
|
||||
@NonNull
|
||||
SaganClient saganClient;
|
||||
@NonNull
|
||||
Logger logger;
|
||||
@NonNull GitOperations git;
|
||||
@NonNull GitHub github;
|
||||
@NonNull DeploymentOperations deployment;
|
||||
@NonNull BuildOperations build;
|
||||
@NonNull SaganClient saganClient;
|
||||
@NonNull Logger logger;
|
||||
|
||||
@CliCommand("verify")
|
||||
public void verifyReleaseTools(@CliOption(key = "", mandatory = false) String module) {
|
||||
@CliCommand("verify")
|
||||
public void verifyReleaseTools(@CliOption(key = "", mandatory = false) String module) {
|
||||
|
||||
if (ObjectUtils.isEmpty(module) || "git".equals(module)) {
|
||||
// Git checkout build
|
||||
git.verify();
|
||||
}
|
||||
if (ObjectUtils.isEmpty(module) || "git".equals(module)) {
|
||||
// Git checkout build
|
||||
git.verify();
|
||||
}
|
||||
|
||||
if (ObjectUtils.isEmpty(module) || "build".equals(module)) {
|
||||
// Maven interaction
|
||||
build.verify();
|
||||
}
|
||||
if (ObjectUtils.isEmpty(module) || "build".equals(module)) {
|
||||
// Maven interaction
|
||||
build.verify();
|
||||
}
|
||||
|
||||
if (ObjectUtils.isEmpty(module) || "deployment".equals(module)) {
|
||||
// Artifactory verification
|
||||
deployment.verifyAuthentication();
|
||||
}
|
||||
if (ObjectUtils.isEmpty(module) || "deployment".equals(module)) {
|
||||
// Artifactory verification
|
||||
deployment.verifyAuthentication();
|
||||
}
|
||||
|
||||
if (ObjectUtils.isEmpty(module) || "github".equals(module)) {
|
||||
// GitHub verification
|
||||
github.verifyAuthentication();
|
||||
}
|
||||
if (ObjectUtils.isEmpty(module) || "github".equals(module)) {
|
||||
// GitHub verification
|
||||
github.verifyAuthentication();
|
||||
}
|
||||
|
||||
if (ObjectUtils.isEmpty(module) || "sagan".equals(module)) {
|
||||
// Sagan Verification
|
||||
saganClient.verifyAuthentication();
|
||||
}
|
||||
if (ObjectUtils.isEmpty(module) || "sagan".equals(module)) {
|
||||
// Sagan Verification
|
||||
saganClient.verifyAuthentication();
|
||||
}
|
||||
|
||||
logger.log("Verify", "All settings are verified. You can ship a release now.");
|
||||
}
|
||||
logger.log("Verify", "All settings are verified. You can ship a release now.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user