diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-12-13 21:08:10 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-12-13 21:08:10 +0100 |
commit | 11ed6c6f88a063894a114af97c5a8e84bb730927 (patch) | |
tree | d6c6aa76630ccbb3c8c99974957973c1f205787c /doc/conf.py | |
parent | 0c80a1a86461d53b7f628cff504c3698a59c7317 (diff) | |
download | ghdl-11ed6c6f88a063894a114af97c5a8e84bb730927.tar.gz ghdl-11ed6c6f88a063894a114af97c5a8e84bb730927.tar.bz2 ghdl-11ed6c6f88a063894a114af97c5a8e84bb730927.zip |
hack doc and regenerate texi file.
Diffstat (limited to 'doc/conf.py')
-rw-r--r-- | doc/conf.py | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/doc/conf.py b/doc/conf.py index 3374b63e0..9c64a6ff6 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -76,25 +76,12 @@ author = u'Tristan Gingold and contributors' # |version| and |release|, also used in various other places throughout the # built documents. # -def _IsUnderGitControl(): - return (subprocess.check_output(["git", "rev-parse", "--is-inside-work-tree"], universal_newlines=True).strip() == "true") - -def _LatestTagName(): - return subprocess.check_output(["git", "describe", "--abbrev=0", "--tags"], universal_newlines=True).strip() - try: - if _IsUnderGitControl: - descr = _LatestTagName() - if descr.startswith('v'): - version = descr[1:] # remove prefix "v" - else: - version = descr - else: - with open('../src/version.in') as verin: - for line in verin: - line = re.findall(r'Ghdl_Ver.+\"(.+)\";', line) - if line: - version=line[0] + with open('../src/version.in') as verin: + for line in verin: + line = re.findall(r'Ghdl_Ver.+\"(.+)\";', line) + if line: + version=line[0] except Exception, e: print "cannot extract version: %s" % e version = "latest" @@ -362,4 +349,4 @@ extlinks = { 'ghdlissue': ('https://github.com/tgingold/ghdl/issues/%s', 'issue #'), 'ghdlpull': ('https://github.com/tgingold/ghdl/pull/%s', 'pull request #'), 'ghdlsrc': ('https://github.com/tgingold/ghdl/blob/master/src/%s', None) -}
\ No newline at end of file +} |