diff --git a/.github/workflows/release-docker-amd-nightly.yml b/.github/workflows/release-docker-amd-nightly.yml index ba082c78e..5130cbcda 100644 --- a/.github/workflows/release-docker-amd-nightly.yml +++ b/.github/workflows/release-docker-amd-nightly.yml @@ -28,6 +28,11 @@ jobs: with: 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" run: | echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV @@ -35,8 +40,8 @@ jobs: - name: Get version from latest tag id: version run: | - # Get the latest version tag sorted by version number (e.g., v0.5.7 -> 0.5.7) - VERSION=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1 | sed 's/^v//') + # Use the shared helper so stable/post releases sort above rc tags. + VERSION=$(python3 python/tools/get_version_tag.py --tag-only | sed 's/^v//') if [ -z "$VERSION" ]; then echo "::error::Could not determine version from git tags" @@ -181,8 +186,8 @@ jobs: # - name: Get version from latest tag # id: version # run: | - # # Get the latest version tag sorted by version number (e.g., v0.5.7 -> 0.5.7) - # VERSION=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1 | sed 's/^v//') + # # Use the shared helper so stable/post releases sort above rc tags. + # VERSION=$(python3 python/tools/get_version_tag.py --tag-only | sed 's/^v//') # if [ -z "$VERSION" ]; then # echo "::error::Could not determine version from git tags" diff --git a/.github/workflows/release-docker-amd-rocm720-nightly.yml b/.github/workflows/release-docker-amd-rocm720-nightly.yml index 0d1419065..d801c77cc 100644 --- a/.github/workflows/release-docker-amd-rocm720-nightly.yml +++ b/.github/workflows/release-docker-amd-rocm720-nightly.yml @@ -28,6 +28,11 @@ jobs: with: 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" run: | echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV @@ -35,8 +40,8 @@ jobs: - name: Get version from latest tag id: version run: | - # Get the latest version tag sorted by version number (e.g., v0.5.7 -> 0.5.7) - VERSION=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1 | sed 's/^v//') + # Use the shared helper so stable/post releases sort above rc tags. + VERSION=$(python3 python/tools/get_version_tag.py --tag-only | sed 's/^v//') if [ -z "$VERSION" ]; then echo "::error::Could not determine version from git tags" diff --git a/scripts/ci/amd/amd_ci_start_container.sh b/scripts/ci/amd/amd_ci_start_container.sh index e1944f4ab..9ba61dd88 100755 --- a/scripts/ci/amd/amd_ci_start_container.sh +++ b/scripts/ci/amd/amd_ci_start_container.sh @@ -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 if git fetch --tags origin; then - # Get the latest version tag sorted by version number (e.g., v0.5.7) - VERSION_FROM_TAG=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1) + # Use the shared helper so stable/post releases sort above rc tags. + VERSION_FROM_TAG=$(python3 python/tools/get_version_tag.py --tag-only || true) if [ -n "$VERSION_FROM_TAG" ]; then SGLANG_VERSION="$VERSION_FROM_TAG" echo "Using SGLang version from git tags: $SGLANG_VERSION" diff --git a/scripts/ci/amd/amd_ci_start_container_disagg.sh b/scripts/ci/amd/amd_ci_start_container_disagg.sh index 76e2698fb..0402b1b62 100755 --- a/scripts/ci/amd/amd_ci_start_container_disagg.sh +++ b/scripts/ci/amd/amd_ci_start_container_disagg.sh @@ -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 if git fetch --tags origin; then - # Get the latest version tag sorted by version number (e.g., v0.5.7) - VERSION_FROM_TAG=$(git tag -l 'v[0-9]*' --sort=-v:refname | head -1) + # Use the shared helper so stable/post releases sort above rc tags. + VERSION_FROM_TAG=$(python3 python/tools/get_version_tag.py --tag-only || true) if [ -n "$VERSION_FROM_TAG" ]; then SGLANG_VERSION="$VERSION_FROM_TAG" echo "Using SGLang version from git tags: $SGLANG_VERSION"