Skip to content

Commit

Permalink
Get version from the submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
gthess committed Jan 4, 2023
1 parent 56bdd67 commit 30b7649
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import datetime
import sphinx_rtd_theme
import re

# -- Project information -----------------------------------------------------

Expand All @@ -27,7 +28,15 @@
author = 'NLnet Labs'

# The short X.Y version
version = '1.17.0'
version = '?.?.?'
# Take the version from the Unbound submodule
package_version_re = re.compile(r"^PACKAGE_VERSION='(?P<version>\d+\.\d+\.\d+)'")
with open('../unbound/configure', 'r') as f:
for line in f:
m = package_version_re.match(line)
if m:
version = m.group('version')
break
# The full version, including alpha/beta/rc tags
release = version

Expand Down

0 comments on commit 30b7649

Please sign in to comment.