diff --git a/doc/conf.py b/doc/conf.py index db256dfbc4eb4522698b3eff50b3e8ee787c020d..409f99e908c63615d970c42bc08736c23459a755 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -20,12 +20,13 @@ import subprocess import sys import inspect import tempfile +import unittest from docutils import nodes from sphinx.util.docfields import TypedField from sphinx import addnodes -import unittest +import lisa # This ugly hack is required because by default TestCase.__module__ is # equal to 'case', so sphinx replaces all of our TestCase uses to @@ -118,15 +119,16 @@ copyright = u'2017, ARM-Software' # |version| and |release|, also used in various other places throughout the # built documents. # - try: git_description = subprocess.check_output( ['git', 'describe', '--tags', '--match=v??.??']) version = re.match('v([0-9][0-9]\.[0-9][0-9]).*', git_description).group(1) - release = version except Exception as e: - logging.error("Couldn't set project version from git: {}".format(e)) - version = release = 'UNKNOWN_VERSION' + logging.info("Couldn't set project version from git: {}".format(e)) + version = lisa.__version__ + +version = str(version) +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.