]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1788] remove "-git" from the version in the ARM
authorAndrei Pavel <andrei@isc.org>
Thu, 1 Apr 2021 13:16:42 +0000 (16:16 +0300)
committerAndrei Pavel <andrei@isc.org>
Fri, 2 Apr 2021 09:47:17 +0000 (09:47 +0000)
doc/sphinx/conf.py

index ffd9ff7d8c48e3a64967dc4afecbcc145e923b95..e8909338548376e2c226df0ce68326afb79e4769 100644 (file)
@@ -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 ---------------------------------------------------