Skip to content

Commit 4c46ae7

Browse files
committed
Add workaround for #2666.
1 parent b65f394 commit 4c46ae7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/finalize.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ def update_changelog():
4646
'--yes',
4747
]
4848
subprocess.check_call(cmd)
49+
_repair_changelog()
50+
51+
52+
def _repair_changelog():
53+
"""
54+
Workaround for #2666
55+
"""
56+
changelog_fn = pathlib.Path('CHANGES.rst')
57+
changelog = changelog_fn.read_text()
58+
fixed = re.sub(r'^(v[0-9.]+)v[0-9.]+$', r'\1', changelog, flags=re.M)
59+
changelog_fn.write_text(fixed)
60+
subprocess.check_output(['git', 'add', changelog_fn])
4961

5062

5163
def bump_version():

0 commit comments

Comments
 (0)