Skip to content

Commit c7ef13a

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 cc453b2 commit c7ef13a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/maint/create_release.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ def update_changelog(release_version, new_version):
2828
marker = f'{release_version} (in development)'
2929
pos = changelog.find(marker)
3030
assert pos != -1
31-
pos += 2 * len(marker) + 1
31+
pos += len(marker) + 1
32+
# Skip the next line which should just be hyphens
33+
assert changelog[pos] == '-'
34+
pos = changelog.find('\n', pos)
35+
assert pos != -1
3236

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

0 commit comments

Comments
 (0)