@@ -55,10 +55,10 @@ author = "sparse's development community"
# |version| and |release|, also used in various other places throughout the
# built documents.
#
-# The short X.Y version.
-version = u'0.5.9'
# The full version, including alpha/beta/rc tags.
-release = u'0.5.9'
+release = next(open('../Makefile', 'r')).split('=')[1].rstrip()
+# The short X.Y version.
+version = release.split('-')[0]
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Documentation generated by sphinx reference the version of the project being documented. This version need to be specified via sphinx's config file. However, if this version number is simply added there, it's guaranteed that soon or later it will be out-of-synch with git's version tag (or the version number present in the Makefile). Fix this by trying to read the version from git or, if this fails, from the Makefile. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- Documentation/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)