diff options
author | jaseg <git@jaseg.de> | 2022-02-07 00:03:46 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2022-02-07 00:03:46 +0100 |
commit | 766c4eb4b3c962d523d37511fb0875e779234961 (patch) | |
tree | 7490e3fc759dd58681716ba422b621d8aa1eab11 /docs | |
parent | 4d1f4c709d26d5e2dae7d2c11e2e63f4ad8f1420 (diff) | |
download | gerbonara-0.9.14.tar.gz gerbonara-0.9.14.tar.bz2 gerbonara-0.9.14.zip |
docs: auto-discover version from gitv0.9.14
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py index 915f0dc..1571c1d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,6 +10,12 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. +import subprocess +def version(): + res = subprocess.run(['git', 'describe', '--tags', '--match', 'v*'], capture_output=True, check=True, text=True) + version, _, _rest = res.stdout.strip()[1:].partition('-') + return version + from pathlib import Path import sys sys.path.insert(0, str(Path(__file__).parent.parent.absolute())) @@ -21,7 +27,7 @@ copyright = '2022, Jan Götte' author = 'jaseg' # The full version, including alpha/beta/rc tags -release = '0.9.0' +release = version() # -- General configuration --------------------------------------------------- |