From ecff434886f685b1dce0637ed7af62a342d0d304 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Tue, 27 Aug 2024 10:21:31 +1200 Subject: [PATCH] Docs: Use version name from readthedocs Latest still gets -dev, but if it's a docs preview use the tag/branch name. --- docs/source/conf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 4719dc89e..2dc370c4b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -62,8 +62,12 @@ autosectionlabel_prefix_document = True autosectionlabel_maxdepth = 1 # set version -if os.getenv("READTHEDOCS") and os.getenv("READTHEDOCS_VERSION") == "latest": - release = yosys_ver + "-dev" +if os.getenv("READTHEDOCS"): + rtds_version = os.getenv("READTHEDOCS_VERSION") + if rtds_version == "latest": + release = yosys_ver + "-dev" + else: + release = rtds_version else: release = yosys_ver