diff doc/conf.py @ 1440:939b5c643f3d

doc: use VERSION file to get version in the same way as for backend
author Goffi <goffi@goffi.org>
date Fri, 18 Jun 2021 15:31:29 +0200
parents 822bd0139769
children e1ccba0d2b71
line wrap: on
line diff
--- 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 ---------------------------------------------------