change get_version to adhere to PEP 440

This commit is contained in:
PHP Wellnitz 2022-05-19 16:57:18 +09:00
parent 567e2c930b
commit 3555dc97c9
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ __version__ = "2.8.2"
def get_version(): def get_version():
try: try:
return __version__ + '.dev9999+git.' + str(subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()) return __version__ + 'b' + subprocess.check_output(['git', 'rev-list', '--count', __version__ + '..HEAD']).strip().decode()
except Exception: except Exception:
print_exc() print_exc()
return __version__ return __version__