From 13fd0c6c167c32920d9e4be635bdc05dc7e14334 Mon Sep 17 00:00:00 2001 From: "Glenn K. Lockwood" Date: Fri, 21 Sep 2018 19:23:59 -0400 Subject: [PATCH] populate sphinx doc versions automatically --- doc/sphinx/conf.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 05e5807..8bee2a4 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -67,15 +67,27 @@ master_doc = 'index' project = u'IOR' copyright = u'2017, IOR' author = u'IOR' + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = u'3.1.0' +version = u'3.2' # The full version, including alpha/beta/rc tags. -release = u'0' +release = u'3.2.0' + +for line in open(os.path.join('..', '..', 'META', 'r')): + key, value = line.split(None, 1) + if key == "Package:": + project = value + elif key == "Version:": + version = value.rsplit('.', 1)[0] + release = value +# We don't use the release field +# elif key == "Release:": +# release = value # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.