[F] Fix script
This commit is contained in:
parent
42421bc57d
commit
bf60e4265b
1 changed files with 9 additions and 2 deletions
|
|
@ -51,8 +51,15 @@ def edit_versions(version: str):
|
|||
path = Path('hyfetch/__version__.py')
|
||||
content = [f"VERSION = '{version}'" if l.startswith('VERSION = ') else l for l in path.read_text().split('\n')]
|
||||
path.write_text('\n'.join(content))
|
||||
|
||||
# 3. Cargo.toml
|
||||
print('Editing Cargo.toml...')
|
||||
path = Path('Cargo.toml')
|
||||
content = path.read_text()
|
||||
content = re.sub(r'(?<=^version = ")[^"]+(?="$)', version, content)
|
||||
path.write_text(content)
|
||||
|
||||
# 3. README.md
|
||||
# 4. README.md
|
||||
print('Editing README.md...')
|
||||
path = Path('README.md')
|
||||
content = path.read_text()
|
||||
|
|
@ -61,7 +68,7 @@ def edit_versions(version: str):
|
|||
content = content[:changelog_i] + f'\n\n### {version}' + content[changelog_i:]
|
||||
path.write_text(content)
|
||||
|
||||
# 4. neofetch script
|
||||
# 5. neofetch script
|
||||
print('Editing neofetch...')
|
||||
path = Path('neofetch')
|
||||
lines = path.read_text().replace("\t", " ").split('\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue