This commit is contained in:
Marcin Grzejszczak
2019-05-02 11:47:33 +04:00
parent b1ae873800
commit 666584bf68
7 changed files with 27 additions and 6 deletions

View File

@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.cloud.release.internal.pom.ProjectVersion;
import org.springframework.util.StringUtils;
/**
* @author Marcin Grzejszczak
@@ -83,7 +84,7 @@ public class SaganUpdater {
if (indexDoc.exists()) {
log.debug("Index adoc file exists");
String fileText = fileToText(indexDoc);
if (!fileText.equals(project.rawOverview)) {
if (StringUtils.hasText(fileText) && !fileText.equals(project.rawOverview)) {
log.info(
"Index adoc content differs from the previously stored, will update it");
project.rawOverview = fileText;
@@ -93,7 +94,8 @@ public class SaganUpdater {
if (bootDoc.exists()) {
log.debug("Boot adoc file exists");
String fileText = fileToText(bootDoc);
if (!fileText.equals(project.rawBootConfig)) {
if (StringUtils.hasText(fileText)
&& !fileText.equals(project.rawBootConfig)) {
log.info(
"Boot adoc content differs from the previously stored, will update it");
project.rawBootConfig = fileText;

View File

@@ -29,7 +29,11 @@ import org.eclipse.jgit.transport.URIish;
/**
* @author Marcin Grzejszczak
*/
public class GitTestUtils {
public final class GitTestUtils {
private GitTestUtils() {
throw new IllegalStateException("Can't instantiate a utility class");
}
public static void setOriginOnProjectToTmp(File origin, File project)
throws GitAPIException, MalformedURLException {

View File

@@ -21,7 +21,11 @@ import java.io.IOException;
import org.eclipse.jgit.util.FileUtils;
public class TestUtils {
public final class TestUtils {
private TestUtils() {
throw new IllegalStateException("Can't instantiate a utility class");
}
public static void prepareLocalRepo() throws IOException {
prepareLocalRepo("target/test-classes/projects/", "spring-cloud");

View File

@@ -29,7 +29,11 @@ import org.eclipse.jgit.transport.URIish;
/**
* @author Marcin Grzejszczak
*/
public class GitTestUtils {
public final class GitTestUtils {
private GitTestUtils() {
throw new IllegalStateException("Can't instantiate a utility class");
}
public static void setOriginOnProjectToTmp(File origin, File project)
throws GitAPIException, MalformedURLException {

View File

@@ -21,7 +21,11 @@ import java.io.IOException;
import org.eclipse.jgit.util.FileUtils;
public class TestUtils {
public final class TestUtils {
private TestUtils() {
throw new IllegalStateException("Can't instantiate a utility class");
}
public static void prepareLocalRepo() throws IOException {
prepareLocalRepo("target/test-classes/projects/", "spring-cloud");

View File

@@ -805,6 +805,8 @@ public class AcceptanceTests {
.add(s));
releaserProperties.getGit().setDocumentationUrl(
file("/projects/spring-cloud-static-angel/").toURI().toString());
releaserProperties.getGit().setReleaseTrainBomUrl(
file("/projects/spring-cloud-release/").toURI().toString());
releaserProperties.getMaven().setBuildCommand("echo executed_build");
releaserProperties.getMaven().setDeployCommand("echo executed_deploy");
releaserProperties.getMaven()

View File

@@ -28,4 +28,5 @@
<suppress files=".*org.springframework.cloud.release.internal.sagan.Release.*" checks="JavadocVariableCheck"/>
<suppress files=".*org.springframework.cloud.release.internal.sagan.ReleaseUpdate.*" checks="JavadocVariableCheck"/>
<suppress files=".*org.springframework.cloud.release.internal.sagan.Repository.*" checks="JavadocVariableCheck"/>
<suppress files=".*src.test.java.*" checks="JavadocVariableCheck"/>
</suppressions>