Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. 'stable32').
# For direct pushes: GITHUB_REF is 'refs/heads/stable32'.
_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 = os.environ.get('DOCS_DISPLAY_VERSION') or (
Expand Down
Loading