changeset 4102:c0bb4b3fdccf

doc (conf): fix version retrieval
author Goffi <goffi@goffi.org>
date Fri, 23 Jun 2023 15:19:06 +0200
parents 4ed8de94c926
children eaa0daa7f834
files doc/conf.py
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/doc/conf.py	Fri Jun 23 15:18:43 2023 +0200
+++ b/doc/conf.py	Fri Jun 23 15:19:06 2023 +0200
@@ -16,6 +16,7 @@
 import sys
 import os.path
 import re
+from libervia.backend import __version__
 
 
 sys.path.insert(0, os.path.abspath("./_ext"))
@@ -27,16 +28,7 @@
 copyright = '2019-2023 Libervia'
 author = 'Libervia team'
 
-doc_dir = os.path.dirname(os.path.abspath(__file__))
-version_path = os.path.join(doc_dir, '../libervia/backend/VERSION')
-with open(version_path) as f:
-    version_full = f.read()
-
-# The short X.Y version
-version = re.match(r'[0-9.]+', version_full).group()
-
-# The full version, including alpha/beta/rc tags
-release = version_full
+version = __version__
 
 
 # -- General configuration ---------------------------------------------------