From 20d030a5e0c0b9adad30dcf199155cc1d6aca6e0 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Wed, 28 May 2025 15:58:58 +0100 Subject: [PATCH] Made release in site dynamic --- docs/conf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 5118a35..64c281d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,10 +5,16 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +def get_release() -> str: + import subprocess + pkgid = subprocess.run(["cargo", "pkgid"], capture_output=True).stdout.decode().strip() + release_start = pkgid.rfind("#") + 1 + return pkgid[release_start:] + project = "RAL" copyright = "2024, Cian Hughes" author = "Cian Hughes" -release = "0.4.3" +release = get_release() # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration