Polish
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user