From dbe692a6fe2faaa72d1378f4fbc5fcad711948d8 Mon Sep 17 00:00:00 2001 From: Peter Park Date: Thu, 10 Oct 2024 10:59:56 -0400 Subject: [PATCH] Fix Sphinx config to get VERSION correctly --- docs/conf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8486fce8..97e7cf93 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,13 +6,12 @@ import re -from rocm_docs import ROCmDocs - with open('../CMakeLists.txt', encoding='utf-8') as f: - match = re.search(r'.*\bset \( RVS_VERSION\s+\"?([0-9.]+)[^0-9.]+', f.read()) + match = re.search(r'project\s*\(.*VERSION\s+([0-9.]+)\)', f.read(), re.DOTALL) if not match: raise ValueError("VERSION not found!") version_number = match[1] + left_nav_title = f"RVS {version_number} Documentation" # for PDF output on Read the Docs