doc (conf): fix version retrieval
This commit is contained in:
parent
264d1b8356
commit
75c8868620
1 changed files with 2 additions and 10 deletions
12
doc/conf.py
12
doc/conf.py
|
|
@ -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 ---------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue