Skip to content

Commit 49f736c

Browse files
committed
docs: derive current_version from DOCS_DISPLAY_VERSION too
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 <skjnldsv@protonmail.com>
1 parent 8c807fc commit 49f736c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@
6666
version_stable = 34 # mapped to https://docs.nextcloud.com/server/stable/
6767
import re as _re
6868
# Detect stable branch version for display purposes.
69+
# In the consolidated deploy DOCS_DISPLAY_VERSION carries the built version (the
70+
# reserved GITHUB_* refs cannot be set per matrix leg).
6971
# For PRs: GITHUB_BASE_REF is the target branch (e.g. 'stable34').
7072
# For direct pushes: GITHUB_REF is 'refs/heads/stable34'.
7173
_base = os.environ.get('GITHUB_BASE_REF', '')
7274
_ref = os.environ.get('GITHUB_REF', '')
7375
_stable_ver = (
74-
_re.match(r'^stable(\d+)$', _base)
76+
_re.match(r'^(\d+)$', os.environ.get('DOCS_DISPLAY_VERSION', ''))
77+
or _re.match(r'^stable(\d+)$', _base)
7578
or _re.match(r'^refs/heads/stable(\d+)$', _ref)
7679
)
7780
display_version = (

0 commit comments

Comments
 (0)