diff options
author | 1138-4EB <1138-4EB@users.noreply.github.com> | 2017-02-17 02:25:27 +0100 |
---|---|---|
committer | 1138-4EB <1138-4EB@users.noreply.github.com> | 2017-02-18 05:14:42 +0100 |
commit | 8c167a344fc568e41b2bd7735394be49600aafbb (patch) | |
tree | f4860fea6062e9b87ec215af7d13b9e94268e5a3 | |
parent | f0857455d654fd3a3b9de1bbca52c7bd6fcb5033 (diff) | |
download | ghdl-8c167a344fc568e41b2bd7735394be49600aafbb.tar.gz ghdl-8c167a344fc568e41b2bd7735394be49600aafbb.tar.bz2 ghdl-8c167a344fc568e41b2bd7735394be49600aafbb.zip |
Fix #221
-rw-r--r-- | doc/conf.py | 14 |
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. # |