Catch the case when the regex fails.
This commit is contained in:
parent
86ff691559
commit
53a541f5b0
|
@ -173,7 +173,9 @@ String get_changelog(repo_name) {
|
|||
String extract(log_content, tag, gCube_release_version, component) {
|
||||
|
||||
def matcher = "${log_content}" =~ /(?im)\[v${tag}\]\s\[r${gCube_release_version}\](.*)\[v.*\]\s\[r.*\]/
|
||||
matcher.find()
|
||||
if (!matcher.find()) {
|
||||
return 'NA'
|
||||
}
|
||||
assert matcher[0]: "Missing release notes for ${component}"
|
||||
return matcher[0]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue