Fix the regex to extract the notes.

This commit is contained in:
Manuele Simi 2020-06-07 15:31:19 -04:00
parent 30c9a1b571
commit 6b32291ec1
1 changed files with 4 additions and 4 deletions

View File

@ -171,15 +171,15 @@ String get_changelog(repo_name) {
*/
String extract(log_content, tag, gCube_release_version, component) {
println "Changelong content: ${log_content}"
def matcher = "${log_content}" =~ /(?im)\([v${tag}\]\s\[r${gCube_release_version}\].*)\[v.*\]\s\[r.*\]/
def matcher = ("${log_content}" =~ /(?is)(\[v1\.1\.0\]\s+\[r4\.22\.0\](.+?))\[v.*\]/)
if (!matcher.find()) {
return 'NA'
}
assert matcher[0]: "Missing release notes for ${component}"
for (g in matcher) {
println "Group: $g"
for (i=0; i < matcher.getCount(); i++) {
println "notes matched in matcher[${i}]: '" + matcher[i][0] + "'"
}
return matcher[0]
return matcher[0][0]
}
/**