From 8c167a344fc568e41b2bd7735394be49600aafbb Mon Sep 17 00:00:00 2001 From: 1138-4EB <1138-4EB@users.noreply.github.com> Date: Fri, 17 Feb 2017 02:25:27 +0100 Subject: Fix #221 --- doc/conf.py | 14 +++++++++++--- 1 file 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. # -- cgit v1.2.3