diff options
author | jaseg <git@jaseg.de> | 2024-05-23 10:34:43 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2024-05-23 10:35:12 +0200 |
commit | bf972ae6cb97b8518dcc459f197928ebe1bb90bd (patch) | |
tree | 29e51c9ba8104f39f712b1814bb28d7d6361239f /setup.py | |
parent | 419fa73865d0c90b615874e41ac84dff9e17d7b7 (diff) | |
download | gerbolyze-bf972ae6cb97b8518dcc459f197928ebe1bb90bd.tar.gz gerbolyze-bf972ae6cb97b8518dcc459f197928ebe1bb90bd.tar.bz2 gerbolyze-bf972ae6cb97b8518dcc459f197928ebe1bb90bd.zip |
Make tox tests run
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -10,8 +10,11 @@ from pathlib import Path import re def get_tag(): - res = subprocess.run(['git', 'describe', '--tags', '--match', 'v*'], capture_output=True, check=True, text=True) - return res.stdout.strip() + try: + res = subprocess.run(['git', '--git-dir', str(Path(__file__).with_name('.git')), 'describe', '--tags', '--match', 'v*'], capture_output=True, check=True, text=True) + return res.stdout.strip() + except subprocess.CalledProcessError as e: + return 'v0.0.0-dev' def get_version(): version, _, _rest = get_tag()[1:].partition('-') |