doc (conf): fix version retrieval

This commit is contained in:
Goffi 2023-06-23 15:19:06 +02:00
commit 75c8868620

View file

@ -16,6 +16,7 @@ import os
import sys
import os.path
import re
from libervia.backend import __version__
sys.path.insert(0, os.path.abspath("./_ext"))
@ -27,16 +28,7 @@ project = 'Libervia Backend'
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 ---------------------------------------------------