Skip to content

Commit d02df50

Browse files
committed
Fix create_release.py script to handle bad underlines
The script was assuming the underline was the same length as the title itself. e.g. it did not handle. ``` 1.3.4 (in development) ------------------- ``` See emscripten-core#24516
1 parent 43822b0 commit d02df50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/maint/create_release.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ def update_changelog(release_version, new_version):
2727
changelog = utils.read_file(changelog_file)
2828
marker = f'{release_version} (in development)'
2929
pos = changelog.find(marker)
30-
assert pos != -1
31-
pos += 2 * len(marker) + 1
30+
pos += len(marker) + 1
31+
# Skip the next line which should just be hypens
32+
assert(changelog[pos] == '-')
33+
pos = changelog.find('\n', pos)
3234

3335
# Add new entry
3436
today = datetime.now().strftime('%m/%d/%y')

0 commit comments

Comments
 (0)