aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortgingold <tgingold@users.noreply.github.com>2017-02-18 06:29:53 +0100
committerGitHub <noreply@github.com>2017-02-18 06:29:53 +0100
commit656eca3dc94e54de94520cfb22079e6aafb4e4eb (patch)
tree1ae0b1e9fd0431662e5d64e02e39e4c9c8fcac65
parent5f6dfc4373418815637a1fa3de15a2d3b025b0ff (diff)
parent8c167a344fc568e41b2bd7735394be49600aafbb (diff)
downloadghdl-656eca3dc94e54de94520cfb22079e6aafb4e4eb.tar.gz
ghdl-656eca3dc94e54de94520cfb22079e6aafb4e4eb.tar.bz2
ghdl-656eca3dc94e54de94520cfb22079e6aafb4e4eb.zip
Merge pull request #287 from 1138-4EB/rtdversion
Fix #221
-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.
#