Skip to content

Commit

Permalink
Add workaround for #2666.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed May 9, 2021
1 parent b65f394 commit 4c46ae7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/finalize.py
Expand Up @@ -46,6 +46,18 @@ def update_changelog():
'--yes',
]
subprocess.check_call(cmd)
_repair_changelog()


def _repair_changelog():
"""
Workaround for #2666
"""
changelog_fn = pathlib.Path('CHANGES.rst')
changelog = changelog_fn.read_text()
fixed = re.sub(r'^(v[0-9.]+)v[0-9.]+$', r'\1', changelog, flags=re.M)
changelog_fn.write_text(fixed)
subprocess.check_output(['git', 'add', changelog_fn])


def bump_version():
Expand Down

0 comments on commit 4c46ae7

Please sign in to comment.