preserve trailing whitespace when transforming CHANGELOG
This commit is contained in:
parent
fda1796670
commit
0724061f76
1 changed files with 3 additions and 3 deletions
6
.github/update-release-branch.py
vendored
6
.github/update-release-branch.py
vendored
|
|
@ -187,9 +187,9 @@ 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:
|
||||||
line = f.readline().rstrip()
|
line = f.readline()
|
||||||
|
|
||||||
output += line + '\n'
|
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
|
# we have found the first section, so now handle things differently
|
||||||
|
|
@ -202,7 +202,7 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
|
||||||
line = f.readline()
|
line = f.readline()
|
||||||
if not line:
|
if not line:
|
||||||
break # EOF
|
break # EOF
|
||||||
line = line.rstrip()
|
line = line.rstrip('\n')
|
||||||
|
|
||||||
# filter out changenote entries that apply only to newer versions
|
# filter out changenote entries that apply only to newer versions
|
||||||
match = some_versions_only_regex.search(line)
|
match = some_versions_only_regex.search(line)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue