]> granicus.if.org Git - icinga2/commitdiff
Remove version number in doc/conf.py.
authorGunnar Beutner <gunnar.beutner@netways.de>
Sat, 17 May 2014 04:58:43 +0000 (06:58 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sat, 17 May 2014 04:58:43 +0000 (06:58 +0200)
Fixes #6222

doc/conf.py

index ed825eb6e46b4086032fa8a58ab366ddff979750..02c0315f3e1ab66acaab07367a45c4f7b19f7e36 100644 (file)
@@ -12,7 +12,7 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys, os
+import sys, os, re
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -44,14 +44,18 @@ master_doc = 'index'
 project = 'Icinga 2'
 copyright = '2014, Icinga Development Team <info@icinga.org>'
 
+_specfp = open('../icinga2.spec')
+_version = re.search("^Version:\\s+(.*)$", _specfp.read(), re.MULTILINE).group(1)
+_specfp.close()
+
 # 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 = '0.0.11'
+version = _version
 # The full version, including alpha/beta/rc tags.
-release = '0.0.10'
+release = _version
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.