Skip to content

Commit 7f488ec

Browse files
committed
Fix post-release script
1 parent c02c6a6 commit 7f488ec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/release.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ def post_release(opts: argparse.Namespace) -> None:
169169
branch_name = f'post-{version}-release'
170170
call('git', 'checkout', '-b', branch_name, opts.ref)
171171

172-
release_notes_dev.write_text(release_notes_dev_header)
173-
release_notes_dev.write_text("\n")
174-
release_notes_dev.write_text(release_notes_dev_list)
172+
with open(release_notes_dev, 'w') as f:
173+
f.write(release_notes_dev_header)
174+
f.write("\n")
175+
f.write(release_notes_dev_list)
175176
toctree_re = re.compile(r'^\.\. toctree::$\n(^ +.*$\n)*^$\n', re.MULTILINE)
176177
replace_in_file(
177178
release_notes_index,

0 commit comments

Comments
 (0)