Mercurial > libervia-web
changeset 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 | ac2374c92294 |
children | c34e973587bd |
files | doc/conf.py |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
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 ---------------------------------------------------