Do not require the gcube release number in the changelogs. Manage when there is only one tag (first release) for the component.
This commit is contained in:
parent
cfa9bc040e
commit
b6b0382937
|
@ -183,12 +183,21 @@ String extract(repo_url, log_content, tag, gCube_release_version, component) {
|
|||
println "Changelong content: ${log_content}"
|
||||
if (log_content.startsWith('Missing CHANGELOG.md'))
|
||||
return log_content + " at ${repo_url}"
|
||||
def matcher = ("${log_content}" =~ /(?is)\[v$tag\]\s*\[r$gCube_release_version\](.*?)##\s+\[v.*?\]/)
|
||||
def section = ''
|
||||
def matcher = ("${log_content}" =~ /(?is)\[v$tag\](.*?)##\s+\[v.*?\]/)
|
||||
if (!matcher.find()) {
|
||||
return "Tags ${tag} / ${gCube_release_version} not found in CHANGELOG.md at ${repo_url}"
|
||||
def eof_matcher = ("${log_content}" =~ /(?is)\[v$tag\](.*$?)/)
|
||||
if (!eof_matcher.find()) {
|
||||
return "Tags ${tag} / ${gCube_release_version} not found in CHANGELOG.md at ${repo_url}"
|
||||
} else {
|
||||
assert eof_matcher[0][1]: "Missing release notes for ${component}"
|
||||
section = eof_matcher[0][1]
|
||||
}
|
||||
} else {
|
||||
assert matcher[0][1]: "Missing release notes for ${component}"
|
||||
section = matcher[0][1]
|
||||
}
|
||||
assert matcher[0][1]: "Missing release notes for ${component}"
|
||||
return matcher[0][1]
|
||||
return section.replace("[r$gCube_release_version]", '')
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue