Skip to content

Commit 122c2b2

Browse files
authored
Merge pull request #15276 from nextcloud/fix/deploy-switcher-version-stable34
docs: derive current_version from DOCS_DISPLAY_VERSION
2 parents e70b0b7 + 49f736c commit 122c2b2

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 = os.environ.get('DOCS_DISPLAY_VERSION') or (

0 commit comments

Comments
 (0)