Polish
This commit is contained in:
@@ -65,24 +65,27 @@ public class SaganUpdater {
|
||||
if (updateReleaseException == null) {
|
||||
log.info("Updating Sagan releases with \n\n{}", update);
|
||||
try {
|
||||
Project project = this.saganClient.updateRelease(currentVersion.projectName,
|
||||
Collections.singletonList(update));
|
||||
Project project = this.saganClient.updateRelease(
|
||||
currentVersion.projectName, Collections.singletonList(update));
|
||||
Optional<ProjectVersion> projectVersion = latestVersion(currentVersion,
|
||||
project);
|
||||
log.info("Found the following latest project version [{}]", projectVersion);
|
||||
log.info("Found the following latest project version [{}]",
|
||||
projectVersion);
|
||||
boolean present = projectVersion.isPresent();
|
||||
if (present && currentVersionNewerOrEqual(currentVersion, projectVersion)) {
|
||||
if (present
|
||||
&& currentVersionNewerOrEqual(currentVersion, projectVersion)) {
|
||||
updateDocumentationIfNecessary(projectFile, project);
|
||||
}
|
||||
else {
|
||||
log.info(present
|
||||
? "Latest version [" + projectVersion.get() + "] present and "
|
||||
+ "the current version [" + currentVersion
|
||||
+ "] is older than that one. " + "Will do nothing."
|
||||
+ "the current version [" + currentVersion
|
||||
+ "] is older than that one. " + "Will do nothing."
|
||||
: "No latest version found. Will do nothing.");
|
||||
return ExecutionResult.skipped();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
catch (Exception ex) {
|
||||
log.warn("Exception occurred while trying to update sagan release", ex);
|
||||
updateReleaseException = ex;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,8 @@ public class ExecutionResult implements Serializable {
|
||||
}
|
||||
|
||||
private static Exception breakReferenceChain(Exception cause) {
|
||||
if (cause instanceof HttpServerErrorException || cause instanceof HttpClientErrorException) {
|
||||
if (cause instanceof HttpServerErrorException
|
||||
|| cause instanceof HttpClientErrorException) {
|
||||
System.out.println("Breaking the reference chain. . . i think");
|
||||
return new RuntimeException(
|
||||
"[Breaking self reference chain] " + cause.toString());
|
||||
|
||||
Reference in New Issue
Block a user