From 8ee516e640c06b88ec5fab64fcee10cbb6479a01 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Sat, 14 Jan 2023 22:03:56 -0500 Subject: [PATCH] [U] Update release script --- tools/deploy-release.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/deploy-release.py b/tools/deploy-release.py index 7381d655..6bcaf3ea 100755 --- a/tools/deploy-release.py +++ b/tools/deploy-release.py @@ -55,10 +55,9 @@ def edit_versions(version: str): print('Editing README.md...') path = Path('README.md') content = path.read_text() - changelog_i = content.index('') - version_i = content.index('###', changelog_i) - version_end = content.index('\n', version_i) - content = content[:version_i] + f'### {version}' + content[version_end:] + changelog_token = '' + changelog_i = content.index(changelog_token) + len(changelog_token) + content = content[:changelog_i] + f'\n\n### {version}' + content[changelog_i:] path.write_text(content) # 4. neofetch script