aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/conf.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 650942af1..069843cb0 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -15,6 +15,7 @@
import sys
import os
import shlex
+import re
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -60,18 +61,25 @@ def _IsUnderGitControl():
def _LatestTagName():
return check_output(["git", "describe", "--abbrev=0", "--tags"], universal_newlines=True).strip()
-version = "0.33" # The short X.Y version.
-release = "0.33" # The full version, including alpha/beta/rc tags.
try:
if _IsUnderGitControl:
latestTagName = _LatestTagName()[1:] # remove prefix "v"
versionParts = latestTagName.split("-")[0].split(".")
version = ".".join(versionParts[:2])
- release = version # ".".join(versionParts[:3])
+ #release = ".".join(versionParts[:3])
+ else:
+ with open('../src/version.in') as verin:
+ for line in verin:
+ line = re.findall(r'Ghdl_Ver.+\"(.+)\";', line)
+ if line:
+ version=line[0]
except:
pass
+#version = "X.Y"
+release = version # The full version, including alpha/beta/rc tags.
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#