Skip to content

Commit

Permalink
feat(doc): Set doc version numbers dynamically from file (#4933)
Browse files Browse the repository at this point in the history
Load documentation version from local version.mk file.
  • Loading branch information
big-r81 committed Dec 31, 2023
1 parent 8f56b8e commit 3d31ca6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import datetime
import os
import sys
from pathlib import Path

import sphinx_rtd_theme

Expand All @@ -29,9 +30,13 @@

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"

Expand Down

0 comments on commit 3d31ca6

Please sign in to comment.