mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 18:03:12 +00:00
Fetch version from Git tags.
__version__ is now fetched from Git tags using a subprocess, this way I don't have to change the code each time I want to up the version.
This commit is contained in:
parent
5bc6e3dca4
commit
1ec6792636
1 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,19 @@
|
|||
import subprocess
|
||||
|
||||
|
||||
def get_latest_git_tag():
|
||||
try:
|
||||
command = ['git', 'describe', '--abbrev=0', '--tags']
|
||||
output = subprocess.check_output(command).decode().strip()
|
||||
return output
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Error: {e}")
|
||||
return "BETA"
|
||||
|
||||
|
||||
__title__ = "RCU"
|
||||
__version__ = "1.2.17"
|
||||
__version__ = get_latest_git_tag()
|
||||
__author__ = "Esther J. J."
|
||||
__author_email__ = "dokimakimaki@gmail.com"
|
||||
__license__ = "GNU GENERAL PUBLIC LICENSE v2"
|
||||
|
|
Loading…
Reference in a new issue