summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-10-19 15:02:48 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-10-19 15:02:48 -0400
commitdbaf5bfe2d63018510ed52860586d5fa5d89c61d (patch)
tree50d44e66498bb3948972044edea1b9a0771e94dc
parentaed8d4f0448bae1e68cf4ff2af0fce87768b921c (diff)
downloadc++-dbaf5bfe2d63018510ed52860586d5fa5d89c61d.tar.gz
c++-dbaf5bfe2d63018510ed52860586d5fa5d89c61d.tar.bz2
c++-dbaf5bfe2d63018510ed52860586d5fa5d89c61d.zip
now correctly gets version from git
-rw-r--r--doc/conf.py31
1 files changed, 4 insertions, 27 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 1b6476d..271a897 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -19,40 +19,17 @@
# -- Project information -----------------------------------------------------
-from subprocess import Popen, PIPE
-
-def get_version():
- """
- Returns project version as string from 'git describe' command.
- """
- pipe = Popen('git describe --tags', stdout=PIPE, shell=True)
- version = pipe.stdout.read()
-
- if version:
- return version
- else:
- return '0.0'
-
-def get_release():
- """
- Returns project version as string from 'git describe' command.
- """
- pipe = Popen('git describe --tags --always', stdout=PIPE, shell=True)
- version = pipe.stdout.read()
-
- if version:
- return version
- else:
- return '0.0'
+import re
+import os
project = 'Wolff'
copyright = '2018, Jaron Kent-Dobias'
author = 'Jaron Kent-Dobias'
# The short X.Y version
-version = '0.0'
+version = re.sub('^v', '', os.popen('git describe --always').read().strip())
# The full version, including alpha/beta/rc tags
-release = get_version().lstrip('v').rstrip()
+release = version
# -- General configuration ---------------------------------------------------