fix: image version in pypi pr workflow (#18735)
This commit is contained in:
15
.github/workflows/release-pypi-pr.yml
vendored
15
.github/workflows/release-pypi-pr.yml
vendored
@@ -34,13 +34,14 @@ jobs:
|
||||
- name: Generate PR wheel version
|
||||
id: gen_version
|
||||
run: |
|
||||
# Get base version from setuptools_scm
|
||||
cd python
|
||||
pip install setuptools-scm
|
||||
FULL_VERSION=$(python -c "from setuptools_scm import get_version; print(get_version(root='..'))")
|
||||
# Strip any existing .dev or + suffix to get clean base version
|
||||
BASE_VERSION=$(echo "$FULL_VERSION" | sed 's/\.dev.*//;s/+.*//')
|
||||
cd ..
|
||||
# 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)
|
||||
BASE_VERSION=${LATEST_TAG#v}
|
||||
echo "Latest release tag: ${LATEST_TAG}"
|
||||
|
||||
# Get commit info
|
||||
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||
|
||||
Reference in New Issue
Block a user