This commit is contained in:
Marcin Grzejszczak
2019-10-29 15:16:42 +01:00
parent 61ff4d7fa7
commit ebf0bd8876
5 changed files with 8 additions and 7 deletions

View File

@@ -113,7 +113,7 @@ public class Releaser implements ReleaserPropertiesAware {
this.gradleUpdater.updateProjectFromBom(project, versions, versionFromScRelease,
assertSnapshots);
ProjectVersion changedVersion = new ProjectVersion(project);
log.info("\n\nProject was successfully updated to [{}]", changedVersion);
log.info("\n\nProject was successfully updated to [{}]", changedVersion.version);
}
public void buildProject(ProjectVersion versionFromScRelease) {

View File

@@ -131,10 +131,6 @@ public class GradleUpdater implements ReleaserPropertiesAware {
Properties props = loadProps(file);
final Map<String, String> substitution = this.properties.getGradle()
.getGradlePropsSubstitution();
// TODO: Automatically should search for e.g. [reactor-pool] ->
// [reactorPoolVersion]
// TODO: [version] -> current project version
// reactorPoolVersion, 1.0.0.BUILD-SNAPSHOT
props.forEach((key, value1) -> {
String projectName = projectName(parentName, substitution, key);
if (!this.projects.containsProject(projectName)) {

View File

@@ -255,7 +255,7 @@ class ProcessExecutor implements ReleaserPropertiesAware {
String runCommand(String[] commands, long waitTimeInMinutes) {
try {
String workingDir = this.workingDir;
log.debug(
log.info(
"Will run the command from [{}] via {} and wait for result for [{}] minutes",
workingDir, commands, waitTimeInMinutes);
ProcessBuilder builder = builder(commands, workingDir);

View File

@@ -24,6 +24,8 @@ import java.util.Objects;
import java.util.regex.Pattern;
import org.apache.maven.model.Model;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.release.internal.tech.PomReader;
import org.springframework.util.StringUtils;
@@ -36,6 +38,8 @@ import org.springframework.util.StringUtils;
*/
public class ProjectVersion implements Comparable<ProjectVersion> {
private static final Logger log = LoggerFactory.getLogger(ProjectVersion.class);
private static final Pattern SNAPSHOT_PATTERN = Pattern
.compile("^.*[\\.|\\-](BUILD-)?SNAPSHOT.*$");
@@ -75,6 +79,7 @@ public class ProjectVersion implements Comparable<ProjectVersion> {
public ProjectVersion(File project) {
File buildGradle = new File(project, "build.gradle");
if (buildGradle.exists()) {
log.info("Retrieving fresh Gradle project version information");
ProjectVersion projectVersion = gradleProject(buildGradle);
this.projectName = projectVersion.projectName;
this.version = projectVersion.version;

View File

@@ -304,7 +304,7 @@ public class SpringReleaser {
}
private void printVersionRetrieval() {
log.info("\n\n\n=== RETRIEVING VERSIONS ===\n\nWill clone the bom"
log.info("\n\n\n=== RETRIEVING VERSIONS ===\n\nWill clone the BOM project"
+ " to retrieve all versions");
}