[U] Update release script

This commit is contained in:
Azalea Gui 2023-01-14 22:03:56 -05:00
parent d4c8472991
commit 8ee516e640
No known key found for this signature in database
GPG key ID: E289FAC0DA92DD2B

View file

@ -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('<!-- CHANGELOG STARTS HERE --->')
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 STARTS HERE --->'
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