Switch for updating spring guides; fixes gh-101
This commit is contained in:
@@ -185,6 +185,11 @@ public class ReleaserProperties implements Serializable {
|
||||
*/
|
||||
private Integer numberOfCheckedMilestones = 10;
|
||||
|
||||
/**
|
||||
* If set to {@code false}, will not update Spring Guides for a release train.
|
||||
*/
|
||||
private boolean updateSpringGuides = true;
|
||||
|
||||
public String getSpringCloudReleaseGitUrl() {
|
||||
return this.springCloudReleaseGitUrl;
|
||||
}
|
||||
@@ -265,13 +270,27 @@ public class ReleaserProperties implements Serializable {
|
||||
this.fetchVersionsFromGit = fetchVersionsFromGit;
|
||||
}
|
||||
|
||||
@Override public String toString() {
|
||||
return "Git{" + "springCloudReleaseGitUrl='" + this.springCloudReleaseGitUrl + '\''
|
||||
+ ", documentationUrl='" + this.documentationUrl + '\''
|
||||
+ ", documentationBranch='" + this.documentationBranch + '\''
|
||||
+ ", cloneDestinationDir='" + this.cloneDestinationDir + '\''
|
||||
+ ", fetchVersionsFromGit=" + this.fetchVersionsFromGit
|
||||
+ ", numberOfCheckedMilestones=" + this.numberOfCheckedMilestones + '}';
|
||||
public boolean isUpdateSpringGuides() {
|
||||
return this.updateSpringGuides;
|
||||
}
|
||||
|
||||
public void setUpdateSpringGuides(boolean updateSpringGuides) {
|
||||
this.updateSpringGuides = updateSpringGuides;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Git{" +
|
||||
"springCloudReleaseGitUrl='" + this.springCloudReleaseGitUrl + '\'' +
|
||||
", documentationUrl='" + this.documentationUrl + '\'' +
|
||||
", documentationBranch='" + this.documentationBranch + '\'' +
|
||||
", updateDocumentationRepo=" + this.updateDocumentationRepo +
|
||||
", cloneDestinationDir='" + this.cloneDestinationDir + '\'' +
|
||||
", fetchVersionsFromGit=" + this.fetchVersionsFromGit +
|
||||
", oauthToken='" + this.oauthToken + '\'' +
|
||||
", numberOfCheckedMilestones=" + this.numberOfCheckedMilestones +
|
||||
", updateSpringGuides=" + this.updateSpringGuides +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,11 @@ class GithubIssues {
|
||||
}
|
||||
|
||||
void fileIssue(Projects projects, ProjectVersion version) {
|
||||
if (!this.properties.getGit().isUpdateSpringGuides()) {
|
||||
log.info("Will not file an issue to Spring Guides, since the switch to do so "
|
||||
+ "is off. Set [releaser.git.update-spring-guides] to [true] to change that");
|
||||
return;
|
||||
}
|
||||
Assert.hasText(this.properties.getGit().getOauthToken(),
|
||||
"You have to pass Github OAuth token for milestone closing to be operational");
|
||||
// do this only for RELEASE & SR
|
||||
|
||||
Reference in New Issue
Block a user