From c96cbaf5d4f1e43b7ee43a0e468d7c09828acaaa Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Thu, 1 Apr 2021 16:16:42 +0300 Subject: [PATCH] [#1788] remove "-git" from the version in the ARM --- doc/sphinx/conf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index ffd9ff7d8c..e890933854 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -28,12 +28,22 @@ author = 'Internet Systems Consortium' # get current kea version config_ac_path = '../../configure.ac' +changelog_path = '../../ChangeLog' 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] + # If the first line of the ChangeLog announces release, it means + # that this is the final release. + dash_parts = release.split('-') + candidate_release = dash_parts[0] + with open(changelog_path) as changelog_file: + first_line = changelog_file.readline() + if candidate_release in first_line and "released" in first_line: + release = candidate_release + break version = release # -- General configuration ---------------------------------------------------