Dynamically retrieve version information for generated docs

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2018-12-07 16:57:40 -08:00
parent e15db4cb20
commit b297b837df
1 changed files with 5 additions and 3 deletions

View File

@ -69,10 +69,12 @@ author = u'Docker Inc'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'2.0'
with open('../docker/version.py', 'r') as vfile:
exec(vfile.read())
# The full version, including alpha/beta/rc tags.
release = u'2.0'
release = version
# The short X.Y version.
version = '{}.{}'.format(version_info[0], version_info[1])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.