diff --git a/releaser-core/src/main/java/releaser/internal/sagan/SaganUpdater.java b/releaser-core/src/main/java/releaser/internal/sagan/SaganUpdater.java index 1988d082..967ba00f 100644 --- a/releaser-core/src/main/java/releaser/internal/sagan/SaganUpdater.java +++ b/releaser-core/src/main/java/releaser/internal/sagan/SaganUpdater.java @@ -64,22 +64,27 @@ public class SaganUpdater { originalVersion, currentVersion, projects); if (updateReleaseException == null) { log.info("Updating Sagan releases with \n\n{}", update); - Project project = this.saganClient.updateRelease(currentVersion.projectName, - Collections.singletonList(update)); - Optional projectVersion = latestVersion(currentVersion, - project); - log.info("Found the following latest project version [{}]", projectVersion); - boolean present = projectVersion.isPresent(); - 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." - : "No latest version found. Will do nothing."); - return ExecutionResult.skipped(); + try { + Project project = this.saganClient.updateRelease(currentVersion.projectName, + Collections.singletonList(update)); + Optional projectVersion = latestVersion(currentVersion, + project); + log.info("Found the following latest project version [{}]", projectVersion); + boolean present = projectVersion.isPresent(); + 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." + : "No latest version found. Will do nothing."); + return ExecutionResult.skipped(); + } + } catch (Exception ex) { + log.warn("Exception occurred while trying to update sagan release", ex); + updateReleaseException = ex; } } return updateReleaseException == null ? ExecutionResult.success() diff --git a/releaser-core/src/main/java/releaser/internal/tech/ExecutionResult.java b/releaser-core/src/main/java/releaser/internal/tech/ExecutionResult.java index 97442f4b..ac1bf92d 100644 --- a/releaser-core/src/main/java/releaser/internal/tech/ExecutionResult.java +++ b/releaser-core/src/main/java/releaser/internal/tech/ExecutionResult.java @@ -75,7 +75,6 @@ public class ExecutionResult implements Serializable { return new RuntimeException( "[Breaking self reference chain] " + cause.toString()); } - System.out.println("Not breaking the reference chain. . . i think"); return cause; }