Removed some comments
This commit is contained in:
parent
f5e2638529
commit
8f8f9db93b
1 changed files with 1 additions and 10 deletions
11
build.gradle
11
build.gradle
|
@ -18,21 +18,14 @@ String generateChangelog() {
|
||||||
def fixes = ""
|
def fixes = ""
|
||||||
def changes = ""
|
def changes = ""
|
||||||
gitLogCmd.eachLine { gitLine ->
|
gitLogCmd.eachLine { gitLine ->
|
||||||
//Remove surrounding quotation marks generated by the git log command
|
|
||||||
def line = gitLine.substring(1, gitLine.length() - 1)
|
def line = gitLine.substring(1, gitLine.length() - 1)
|
||||||
//Escape backslashes
|
|
||||||
//line = line.replaceAll(/(\\)/, "\\/")
|
|
||||||
//Escape quotation marks
|
|
||||||
//line = line.replaceAll('"', '\\\\"')
|
|
||||||
// if (line.toLowerCase().startsWith("[Version]"))
|
|
||||||
|
|
||||||
if (line.trim().startsWith("[")) {
|
if (line.trim().startsWith("[")) {
|
||||||
def sline = line.split("]", 2)
|
def sline = line.split("]", 2)
|
||||||
if (sline.length == 2) {
|
if (sline.length == 2) {
|
||||||
def type = sline[0].trim().toLowerCase().substring(1)
|
def type = sline[0].trim().toLowerCase().substring(1)
|
||||||
def comment = sline[1].trim()
|
def comment = sline[1].trim()
|
||||||
|
|
||||||
//filter out links to issues
|
//filter issue links
|
||||||
if (comment.contains("(")) {
|
if (comment.contains("(")) {
|
||||||
def cline = comment.split("\\(", 2)
|
def cline = comment.split("\\(", 2)
|
||||||
if (cline.length == 2 && cline[1].contains("#")) {
|
if (cline.length == 2 && cline[1].contains("#")) {
|
||||||
|
@ -70,8 +63,6 @@ String generateChangelog() {
|
||||||
changelog += "\n\n"
|
changelog += "\n\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Useful log so you can see what was generated in the Gradle output
|
|
||||||
println "Changelog since $lastTag:\n$changelog"
|
println "Changelog since $lastTag:\n$changelog"
|
||||||
return changelog
|
return changelog
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue