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:39 UTC

(couchdb) branch docs/stable-version-number created (now ce8060054)

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a change to branch docs/stable-version-number
in repository https://gitbox.apache.org/repos/asf/couchdb.git


      at ce8060054 feat(docs): Set docs version numbers dynamically from file

This branch includes the following new commits:

     new ce8060054 feat(docs): Set docs version numbers dynamically from file

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(couchdb) 01/01: feat(docs): Set docs version numbers dynamically from file

Posted by ro...@apache.org.
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"