From 2e2f35645969066b5f785b3ae7d1694f8b8aed79 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 17 May 2014 06:58:43 +0200 Subject: [PATCH] Remove version number in doc/conf.py. Fixes #6222 --- doc/conf.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index ed825eb6e..02c0315f3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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 ' +_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.