Skip to content

Commit 025c0a3

Browse files
author
Stewart Miles
committed
Fixed version summary extraction from CHANGELOG.md
Vesion summary extraction was only reading the first section of the version (e.g bug fixes) from the changelog and when creating the commit message since all headings started with hash / pound they would be treated as comments by git and stripped from the message. Change-Id: I6469c8fee4c4b3337ef5c539d31ac0ef3ce82992
1 parent a689d91 commit 025c0a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,10 +1622,14 @@ task gitAddReleaseFilesToStaging(type: Exec, dependsOn: releasePlugin) {
16221622
*/
16231623
String readVersionSummaryFromChangelog() {
16241624
String versionSummary = ""
1625+
Boolean foundVersion = false
16251626
for (String line in project.ext.changelog.text.tokenize("\n")) {
16261627
String trimmedLine = line.trim()
1627-
if (line.isEmpty()) break
1628-
versionSummary += line + "\n"
1628+
if (line =~ /^# Version/) {
1629+
if (foundVersion) break
1630+
foundVersion = true
1631+
}
1632+
versionSummary += line.replace("#", "-") + "\n"
16291633
}
16301634
return versionSummary
16311635
}

0 commit comments

Comments
 (0)