From 954fd3318e8fe5f71086f377b10b378f5ea5c68b Mon Sep 17 00:00:00 2001 From: srawat <120587655+SwRaw@users.noreply.github.com> Date: Tue, 5 Aug 2025 17:07:55 +0530 Subject: [PATCH] Update conf.py [ROCm/rdc commit: e3eb0f71b1542caa1b390d513e372ad76d521391] --- projects/rdc/docs/conf.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/projects/rdc/docs/conf.py b/projects/rdc/docs/conf.py index a6b948e751..c07f68d2f1 100644 --- a/projects/rdc/docs/conf.py +++ b/projects/rdc/docs/conf.py @@ -4,14 +4,22 @@ # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +import re + # for PDF output on Read the Docs project = "ROCm Data Center tool" author = "Advanced Micro Devices, Inc." copyright = "Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved." +with open('../CMakeLists.txt', encoding='utf-8') as f: + match = re.search(r'.*\bget_version_from_tag\(\"([0-9.]+)\"', f.read()) + if not match: + raise ValueError("VERSION not found!") + version_number = match[1] + html_theme = "rocm_docs_theme" html_theme_options = {"flavor": "rocm"} -html_title = f"RDC documentation" +html_title = f"RDC {version_number} documentation" external_toc_path = "./sphinx/_toc.yml" external_projects_current_project = "rdc"