This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/main by this push:
new 3d31ca6dd feat(doc): Set doc version numbers dynamically from file
(#4933)
3d31ca6dd is described below
commit 3d31ca6ddf1e14d939a18bdb05d96363e1138e99
Author: Ronny Berndt <[email protected]>
AuthorDate: Sun Dec 31 23:27:27 2023 +0100
feat(doc): Set doc version numbers dynamically from file (#4933)
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 1d64987b6..1f2c12f3f 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']}"
+release = f"{props['vsn_major']}.{props['vsn_minor']}.{props['vsn_patch']}"
project = "Apache CouchDB\u00ae"