You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2023/12/30 14:33:40 UTC
(couchdb) 01/01: feat(docs): Set docs version numbers dynamically from file
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch docs/stable-version-number
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit ce80600542b455de1d1d9b42aa7aa42b941f4673
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Sat Dec 30 15:31:12 2023 +0100
feat(docs): Set docs version numbers dynamically from file
Load documentation version from local version.mk file.
---
src/docs/src/conf.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/docs/src/conf.py b/src/docs/src/conf.py
index f8cce94a9..edcd0facf 100644
--- a/src/docs/src/conf.py
+++ b/src/docs/src/conf.py
@@ -13,6 +13,7 @@
import datetime
import os
import sys
+from pathlib import Path
import sphinx_rtd_theme
@@ -29,9 +30,13 @@ extensions = [
nitpicky = True
-# should be over-written using rebar-inherited settings
-version = "3.3"
-release = "3.3.0"
+# load version numbers from version.mk
+version_file = Path().absolute().joinpath('../../../version.mk').resolve()
+with open(version_file) as file:
+ props = dict(line.strip().split('=', 1) for line in file)
+
+version = f"{props['vsn_major']}.{props['vsn_minor']}" #"3.3"
+release = f"{props['vsn_major']}.{props['vsn_minor']}.{props['vsn_patch']}" #"3.3.3"
project = "Apache CouchDB\u00ae"