Skip to content

Commit

Permalink
Fix ghdl#221
Browse files Browse the repository at this point in the history
  • Loading branch information
1138-4EB committed Feb 18, 2017
1 parent f085745 commit 5482868
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -61,17 +62,24 @@ 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('./version.in') as verin:
for line in verin:
line = re.findall(r'Ghdl_Ver.+\"(.+)\";', line)
if line:
version=line[0]
except:
pass

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.
#
Expand Down

0 comments on commit 5482868

Please sign in to comment.