fix handling of backport changelog
This commit is contained in:
parent
2b2cee5229
commit
f2c09fb28a
1 changed files with 6 additions and 2 deletions
8
.github/update-release-branch.py
vendored
8
.github/update-release-branch.py
vendored
|
|
@ -187,14 +187,18 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
|
||||||
|
|
||||||
# until we find the first section, just duplicate all lines
|
# until we find the first section, just duplicate all lines
|
||||||
while True:
|
while True:
|
||||||
|
found_first_section = False
|
||||||
line = f.readline()
|
line = f.readline()
|
||||||
if not line:
|
if not line:
|
||||||
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
|
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
|
||||||
|
|
||||||
output += line
|
|
||||||
if line.startswith('## '):
|
if line.startswith('## '):
|
||||||
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
|
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
|
||||||
# we have found the first section, so now handle things differently
|
found_first_section = True
|
||||||
|
|
||||||
|
output += line
|
||||||
|
if found_first_section:
|
||||||
|
# we now handle things differently
|
||||||
break
|
break
|
||||||
|
|
||||||
# found_content tracks whether we hit two headings in a row
|
# found_content tracks whether we hit two headings in a row
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue