From 9ce6e4320e1ab852b64c1c7ec4844a0865ad44c7 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Thu, 2 Jul 2026 16:51:48 +0200 Subject: [PATCH] docs: derive current_version from DOCS_DISPLAY_VERSION too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous fix set only display_version from DOCS_DISPLAY_VERSION, but the version switcher (current_version and generateVersionsDocs) still relied on _stable_ver, which is empty in the consolidated deploy — so the switcher showed "latest" and highlighted the wrong version. Let _stable_ver honour DOCS_DISPLAY_VERSION so all three resolve to the built version. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv --- conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 7b5962b2ce3..32b46f96e83 100644 --- a/conf.py +++ b/conf.py @@ -66,12 +66,15 @@ import re as _re # Detect stable branch version for display purposes. +# In the consolidated deploy DOCS_DISPLAY_VERSION carries the built version (the +# reserved GITHUB_* refs cannot be set per matrix leg). # For PRs: GITHUB_BASE_REF is the target branch (e.g. 'stable33'). # For direct pushes: GITHUB_REF is 'refs/heads/stable33'. _base = os.environ.get('GITHUB_BASE_REF', '') _ref = os.environ.get('GITHUB_REF', '') _stable_ver = ( - _re.match(r'^stable(\d+)$', _base) + _re.match(r'^(\d+)$', os.environ.get('DOCS_DISPLAY_VERSION', '')) + or _re.match(r'^stable(\d+)$', _base) or _re.match(r'^refs/heads/stable(\d+)$', _ref) ) display_version = (