From a1692593be5da7c3999c368ed1cc11182fab4ffb Mon Sep 17 00:00:00 2001 From: Michal Nowikowski Date: Fri, 19 Jul 2019 08:11:34 +0200 Subject: [PATCH] change determining kea version to be based on reading configure.ac --- doc/sphinx/Makefile.am | 2 -- doc/sphinx/conf.py | 13 +++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am index 92b7ed1403..8ae4330d03 100644 --- a/doc/sphinx/Makefile.am +++ b/doc/sphinx/Makefile.am @@ -10,8 +10,6 @@ sphinxopts+=-E sphinxopts+=-a sphinxopts+=-j auto sphinxopts+=-c "${abs_srcdir}" -sphinxopts+=-D release="@PACKAGE_VERSION@" -sphinxopts+=-D version="@PACKAGE_VERSION@" static_sources= diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index ef52c59943..e0f36928ee 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -23,6 +23,19 @@ project = 'Kea' copyright = '2019, Internet Systems Consortium' author = 'Internet Systems Consortium' +# get current kea version +config_ac_path = '../../configure.ac' +release = 'UNRELEASED' +with open(config_ac_path) as f: + for line in f.readlines(): + if line.startswith('AC_INIT(kea'): + parts = line.split(',') + release = parts[1] +version = release +print("=" * 30) +print(release) +print("=" * 30) + # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -- 2.47.2