[Fix] Fix setuptools-scm version resolution for rc tags (#22165)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Baizhou Zhang <sobereddiezhang@gmail.com>
This commit is contained in:
Kangyan-Zhou
2026-04-05 16:55:32 -07:00
committed by GitHub
co-authored by Claude Opus 4.6 Baizhou Zhang
parent 30ba1f78b0
commit 93109cc89b
9 changed files with 179 additions and 16 deletions
+1 -6
View File
@@ -34,12 +34,7 @@ jobs:
- name: Generate PR wheel version
id: gen_version
run: |
# Get base version from the latest v*.*.* git tag directly
# Note: We cannot use setuptools_scm here because the [tool.setuptools_scm]
# config (with custom git_describe_command) lives in python/pyproject.toml,
# not at the repo root. Without that config, setuptools_scm falls back to
# default git describe which finds gateway-* tags instead of v*.*.* release tags.
LATEST_TAG=$(git tag --list --sort=-version:refname 'v*.*.*' | head -1)
LATEST_TAG=$(python3 python/tools/get_version_tag.py)
BASE_VERSION=${LATEST_TAG#v}
echo "Latest release tag: ${LATEST_TAG}"