Skip to content

Commit

Permalink
Merge branch '4.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjbaxter committed Feb 22, 2024
2 parents 17daf4b + 88272db commit 43b2b71
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public class ReleaserProperties implements Serializable {

private Versions versions = new Versions();

private boolean commercial = false;

/**
* Project name to its version - overrides all versions retrieved from a release train
* repository like Spring Cloud Release.
Expand Down Expand Up @@ -198,12 +200,20 @@ public void setVersions(Versions versions) {
this.versions = versions;
}

public boolean isCommercial() {
return commercial;
}

public void setCommercial(boolean commercial) {
this.commercial = commercial;
}

@Override
public String toString() {
return "ReleaserProperties{" + "workingDir='" + this.workingDir + '\'' + ", git=" + this.git + ", pom="
+ this.pom + ", maven=" + this.maven + ", gradle=" + this.gradle + ", sagan=" + this.sagan
+ ", fixedVersions=" + this.fixedVersions + ", metaRelease=" + this.metaRelease + ", template="
+ this.template + ", versions=" + this.versions + '}';
+ this.template + ", versions=" + this.versions + ", commercial=" + this.commercial + '}';
}

public ReleaserProperties copy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ private File cloneAndCheckOut(String springProjectUrl, String springProjectUrlBr
return clonedProject;
}

private String addCommercialSuffix(String projectName) {
return this.properties.isCommercial() ? projectName + "-commercial" : projectName;
}

/**
* For meta-release. Works with fixed versions only
* @param projectName - name of the project to clone
Expand All @@ -144,7 +148,7 @@ private File cloneAndCheckOut(String springProjectUrl, String springProjectUrlBr
public File cloneProjectFromOrg(String projectName) {
String orgUrl = this.properties.getMetaRelease().getGitOrgUrl();
String fullUrl = orgUrl.endsWith("/") ? (orgUrl + projectName)
: (orgUrl + "/" + projectName + suffixNonHttpRepo(orgUrl));
: (orgUrl + "/" + addCommercialSuffix(projectName) + suffixNonHttpRepo(orgUrl));
if (log.isDebugEnabled()) {
log.debug("Full url of the project is [{}]", fullUrl);
}
Expand Down

0 comments on commit 43b2b71

Please sign in to comment.