From 27fcb088af7ae3693dc633634a4c2f0b36ee8452 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 27 Apr 2019 21:09:32 -0400 Subject: [PATCH] read version from version file in conf.py --- archivebox/docs/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/archivebox/docs/conf.py b/archivebox/docs/conf.py index 7abad1cf..3a4c51ad 100644 --- a/archivebox/docs/conf.py +++ b/archivebox/docs/conf.py @@ -16,11 +16,15 @@ sys.path.insert(0, os.path.abspath('.')) import django +PYTHON_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) + sys.path.insert(0, os.path.abspath('../')) sys.path.insert(0, os.path.abspath('.')) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") django.setup() +VERSION = open(os.path.join(PYTHON_DIR, 'VERSION'), 'r').read().strip() + # -- Project information ----------------------------------------------------- project = 'ArchiveBox' @@ -28,7 +32,7 @@ copyright = '2019, Nick Sweeting' author = 'Nick Sweeting' # The full version, including alpha/beta/rc tags -release = 'v0.4.0' +release = VERSION # -- General configuration ---------------------------------------------------