Store version in project metadata

This commit is contained in:
Pavel Zwerschke 2024-05-11 19:35:14 +02:00
parent 21a266e302
commit f600d682e7
No known key found for this signature in database
GPG key ID: 43E091FBB4E98046
11 changed files with 45 additions and 22 deletions

View file

@ -2,4 +2,4 @@
set -e
pyinstaller --onefile pferd.py
pyinstaller --onefile --copy-metadata PFERD pferd.py

View file

@ -41,12 +41,12 @@ def extract_changes(lines):
def update_version(version):
with open("PFERD/version.py") as f:
with open("pyproject.toml") as f:
text = f.read()
text = re.sub(r'VERSION = ".*"', f'VERSION = "{version}"', text)
text = re.sub(r'version = ".*"', f'version = "{version}"', text)
with open("PFERD/version.py", "w") as f:
with open("pyproject.toml", "w") as f:
f.write(text)