# HG changeset patch # User Goffi # Date 1624023089 -7200 # Node ID 939b5c643f3de9dd7c5404eb6e63f8febb061d61 # Parent ac2374c922947a6b59c76ced1ffa1291e30f39a2 doc: use VERSION file to get version in the same way as for backend diff -r ac2374c92294 -r 939b5c643f3d doc/conf.py --- a/doc/conf.py Fri Jun 18 15:27:56 2021 +0200 +++ b/doc/conf.py Fri Jun 18 15:31:29 2021 +0200 @@ -15,6 +15,8 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) +import os.path +import re # -- Project information ----------------------------------------------------- @@ -23,10 +25,16 @@ copyright = u'2019-2021 Jérôme Poisson' author = u'Jérôme Poisson' +doc_dir = os.path.dirname(os.path.abspath(__file__)) +version_path = os.path.join(doc_dir, '../libervia/VERSION') +with open(version_path) as f: + version_full = f.read() + # The short X.Y version -version = u'' +version = re.match(r'[0-9.]+', version_full).group() + # The full version, including alpha/beta/rc tags -release = u'0.7' +release = version_full # -- General configuration ---------------------------------------------------