[AMD] Fix nightly version tag selection (#23644)
Co-authored-by: bingxche <bingxche@amd.com>
This commit is contained in:
co-authored by
bingxche
parent
b8d883398d
commit
b060a5ccfd
@@ -28,6 +28,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Required for git describe to find tags
|
fetch-depth: 0 # Required for git describe to find tags
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: "Set Date"
|
- name: "Set Date"
|
||||||
run: |
|
run: |
|
||||||
echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
|
echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
|
||||||
@@ -35,8 +40,8 @@ jobs:
|
|||||||
- name: Get version from latest tag
|
- name: Get version from latest tag
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
# Get the latest version tag sorted by version number (e.g., v0.5.7 -> 0.5.7)
|
# Use the shared helper so stable/post releases sort above rc tags.
|
||||||
VERSION=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1 | sed 's/^v//')
|
VERSION=$(python3 python/tools/get_version_tag.py --tag-only | sed 's/^v//')
|
||||||
|
|
||||||
if [ -z "$VERSION" ]; then
|
if [ -z "$VERSION" ]; then
|
||||||
echo "::error::Could not determine version from git tags"
|
echo "::error::Could not determine version from git tags"
|
||||||
@@ -181,8 +186,8 @@ jobs:
|
|||||||
# - name: Get version from latest tag
|
# - name: Get version from latest tag
|
||||||
# id: version
|
# id: version
|
||||||
# run: |
|
# run: |
|
||||||
# # Get the latest version tag sorted by version number (e.g., v0.5.7 -> 0.5.7)
|
# # Use the shared helper so stable/post releases sort above rc tags.
|
||||||
# VERSION=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1 | sed 's/^v//')
|
# VERSION=$(python3 python/tools/get_version_tag.py --tag-only | sed 's/^v//')
|
||||||
|
|
||||||
# if [ -z "$VERSION" ]; then
|
# if [ -z "$VERSION" ]; then
|
||||||
# echo "::error::Could not determine version from git tags"
|
# echo "::error::Could not determine version from git tags"
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Required for git describe to find tags
|
fetch-depth: 0 # Required for git describe to find tags
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: "Set Date"
|
- name: "Set Date"
|
||||||
run: |
|
run: |
|
||||||
echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
|
echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
|
||||||
@@ -35,8 +40,8 @@ jobs:
|
|||||||
- name: Get version from latest tag
|
- name: Get version from latest tag
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
# Get the latest version tag sorted by version number (e.g., v0.5.7 -> 0.5.7)
|
# Use the shared helper so stable/post releases sort above rc tags.
|
||||||
VERSION=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1 | sed 's/^v//')
|
VERSION=$(python3 python/tools/get_version_tag.py --tag-only | sed 's/^v//')
|
||||||
|
|
||||||
if [ -z "$VERSION" ]; then
|
if [ -z "$VERSION" ]; then
|
||||||
echo "::error::Could not determine version from git tags"
|
echo "::error::Could not determine version from git tags"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ SGLANG_VERSION="v0.5.5" # Default version, will be overridden if git tags are
|
|||||||
|
|
||||||
# Fetch tags from origin to ensure we have the latest
|
# Fetch tags from origin to ensure we have the latest
|
||||||
if git fetch --tags origin; then
|
if git fetch --tags origin; then
|
||||||
# Get the latest version tag sorted by version number (e.g., v0.5.7)
|
# Use the shared helper so stable/post releases sort above rc tags.
|
||||||
VERSION_FROM_TAG=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1)
|
VERSION_FROM_TAG=$(python3 python/tools/get_version_tag.py --tag-only || true)
|
||||||
if [ -n "$VERSION_FROM_TAG" ]; then
|
if [ -n "$VERSION_FROM_TAG" ]; then
|
||||||
SGLANG_VERSION="$VERSION_FROM_TAG"
|
SGLANG_VERSION="$VERSION_FROM_TAG"
|
||||||
echo "Using SGLang version from git tags: $SGLANG_VERSION"
|
echo "Using SGLang version from git tags: $SGLANG_VERSION"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ SGLANG_VERSION="v0.5.5" # Default version, will be overridden if git tags are
|
|||||||
|
|
||||||
# Fetch tags from origin to ensure we have the latest
|
# Fetch tags from origin to ensure we have the latest
|
||||||
if git fetch --tags origin; then
|
if git fetch --tags origin; then
|
||||||
# Get the latest version tag sorted by version number (e.g., v0.5.7)
|
# Use the shared helper so stable/post releases sort above rc tags.
|
||||||
VERSION_FROM_TAG=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1)
|
VERSION_FROM_TAG=$(python3 python/tools/get_version_tag.py --tag-only || true)
|
||||||
if [ -n "$VERSION_FROM_TAG" ]; then
|
if [ -n "$VERSION_FROM_TAG" ]; then
|
||||||
SGLANG_VERSION="$VERSION_FROM_TAG"
|
SGLANG_VERSION="$VERSION_FROM_TAG"
|
||||||
echo "Using SGLang version from git tags: $SGLANG_VERSION"
|
echo "Using SGLang version from git tags: $SGLANG_VERSION"
|
||||||
|
|||||||
Reference in New Issue
Block a user