From b297b837df511178a69f29a9f8461aee0193e278 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Fri, 7 Dec 2018 16:57:40 -0800 Subject: Dynamically retrieve version information for generated docs Signed-off-by: Joffrey F --- docs/conf.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3e17678..f46d1f7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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. -- cgit v1.2.1