diff --git a/.github/workflows/release-docker-amd-nightly.yml b/.github/workflows/release-docker-amd-nightly.yml index 21f304af6..98b958d9f 100644 --- a/.github/workflows/release-docker-amd-nightly.yml +++ b/.github/workflows/release-docker-amd-nightly.yml @@ -41,7 +41,7 @@ jobs: id: version run: | # 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//') + VERSION=$(python3 scripts/release/get_version_tag.py --tag-only | sed 's/^v//') if [ -z "$VERSION" ]; then echo "::error::Could not determine version from git tags" @@ -189,7 +189,7 @@ jobs: # id: version # run: | # # 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//') + # VERSION=$(python3 scripts/release/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 ee62c312f..8126ed7d6 100644 --- a/.github/workflows/release-docker-amd-rocm720-nightly.yml +++ b/.github/workflows/release-docker-amd-rocm720-nightly.yml @@ -50,7 +50,7 @@ jobs: id: version run: | # 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//') + VERSION=$(python3 scripts/release/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-rocm7_15-nightly.yml b/.github/workflows/release-docker-amd-rocm7_15-nightly.yml index 1494e3dd9..7ba67d401 100644 --- a/.github/workflows/release-docker-amd-rocm7_15-nightly.yml +++ b/.github/workflows/release-docker-amd-rocm7_15-nightly.yml @@ -50,7 +50,7 @@ jobs: id: version run: | # 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//') + VERSION=$(python3 scripts/release/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-pypi-nightly.yml b/.github/workflows/release-pypi-nightly.yml index f94a316bf..86d1f65d0 100644 --- a/.github/workflows/release-pypi-nightly.yml +++ b/.github/workflows/release-pypi-nightly.yml @@ -54,7 +54,7 @@ jobs: cd python cp ../README.md ../LICENSE . - TAG=$(python3 ../python/tools/get_version_tag.py) + TAG=$(python3 ../scripts/release/get_version_tag.py) HASH="g$(git rev-parse --short HEAD)" BUILD_DATE=$(date -u +%Y%m%d) diff --git a/.github/workflows/release-pypi-pr.yml b/.github/workflows/release-pypi-pr.yml index 46632b8f3..edcca5c06 100644 --- a/.github/workflows/release-pypi-pr.yml +++ b/.github/workflows/release-pypi-pr.yml @@ -34,7 +34,7 @@ jobs: - name: Generate PR wheel version id: gen_version run: | - LATEST_TAG=$(python3 python/tools/get_version_tag.py) + LATEST_TAG=$(python3 scripts/release/get_version_tag.py) BASE_VERSION=${LATEST_TAG#v} echo "Latest release tag: ${LATEST_TAG}" diff --git a/3rdparty/amd/wheel/sglang/pyproject.toml b/3rdparty/amd/wheel/sglang/pyproject.toml index 0a10f2f4c..0df2b20ee 100644 --- a/3rdparty/amd/wheel/sglang/pyproject.toml +++ b/3rdparty/amd/wheel/sglang/pyproject.toml @@ -213,6 +213,6 @@ exclude = [ [tool.setuptools_scm] root = ".." version_file = "sglang/_version.py" -git_describe_command = ["python3", "python/tools/get_version_tag.py"] +git_describe_command = ["python3", "scripts/release/get_version_tag.py"] # Allow editable installs even when .git metadata is not available. fallback_version = "0.0.0.dev0" diff --git a/python/pyproject.toml b/python/pyproject.toml index a773f66bc..45b0446e0 100755 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -242,7 +242,7 @@ exclude = [ [tool.setuptools_scm] root = ".." version_file = "sglang/_version.py" -git_describe_command = ["python3", "python/tools/get_version_tag.py"] +git_describe_command = ["python3", "scripts/release/get_version_tag.py"] # Allow editable installs even when .git metadata is not available. fallback_version = "0.0.0.dev0" diff --git a/python/pyproject_cpu.toml b/python/pyproject_cpu.toml index 93e51ee10..9cfbb2f21 100644 --- a/python/pyproject_cpu.toml +++ b/python/pyproject_cpu.toml @@ -151,6 +151,6 @@ exclude = [ [tool.setuptools_scm] root = ".." version_file = "sglang/_version.py" -git_describe_command = ["python3", "python/tools/get_version_tag.py"] +git_describe_command = ["python3", "scripts/release/get_version_tag.py"] # Allow editable installs even when .git metadata is not available. fallback_version = "0.0.0.dev0" diff --git a/python/pyproject_npu.toml b/python/pyproject_npu.toml index 9206a139f..5c56fe986 100644 --- a/python/pyproject_npu.toml +++ b/python/pyproject_npu.toml @@ -150,6 +150,6 @@ exclude = [ [tool.setuptools_scm] root = ".." version_file = "sglang/_version.py" -git_describe_command = ["python3", "python/tools/get_version_tag.py"] +git_describe_command = ["python3", "scripts/release/get_version_tag.py"] # Allow editable installs even when .git metadata is not available. fallback_version = "0.0.0.dev0" diff --git a/python/pyproject_other.toml b/python/pyproject_other.toml index 68e2cd89b..abd14689a 100755 --- a/python/pyproject_other.toml +++ b/python/pyproject_other.toml @@ -245,6 +245,6 @@ exclude = [ [tool.setuptools_scm] root = ".." version_file = "sglang/_version.py" -git_describe_command = ["python3", "python/tools/get_version_tag.py"] +git_describe_command = ["python3", "scripts/release/get_version_tag.py"] # Allow editable installs even when .git metadata is not available. fallback_version = "0.0.0.dev0" diff --git a/python/pyproject_xpu.toml b/python/pyproject_xpu.toml index 41cab79ec..d2905a10c 100644 --- a/python/pyproject_xpu.toml +++ b/python/pyproject_xpu.toml @@ -158,6 +158,6 @@ exclude = [ [tool.setuptools_scm] root = ".." version_file = "sglang/_version.py" -git_describe_command = ["python3", "python/tools/get_version_tag.py"] +git_describe_command = ["python3", "scripts/release/get_version_tag.py"] # Allow editable installs even when .git metadata is not available. fallback_version = "0.0.0.dev0" diff --git a/scripts/ci/amd/amd_ci_start_container.sh b/scripts/ci/amd/amd_ci_start_container.sh index 68ee717d2..0715e3259 100755 --- a/scripts/ci/amd/amd_ci_start_container.sh +++ b/scripts/ci/amd/amd_ci_start_container.sh @@ -7,7 +7,7 @@ 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 # 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) + VERSION_FROM_TAG=$(python3 scripts/release/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 e46c2a43d..0c6e8a1db 100755 --- a/scripts/ci/amd/amd_ci_start_container_disagg.sh +++ b/scripts/ci/amd/amd_ci_start_container_disagg.sh @@ -7,7 +7,7 @@ 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 # 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) + VERSION_FROM_TAG=$(python3 scripts/release/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/python/tools/get_version_tag.py b/scripts/release/get_version_tag.py similarity index 100% rename from python/tools/get_version_tag.py rename to scripts/release/get_version_tag.py diff --git a/test/registered/unit/tools/test_get_version_tag.py b/test/registered/unit/tools/test_get_version_tag.py index ed068d18b..57709fa92 100644 --- a/test/registered/unit/tools/test_get_version_tag.py +++ b/test/registered/unit/tools/test_get_version_tag.py @@ -6,7 +6,7 @@ from unittest.mock import patch REPO_ROOT = Path(__file__).resolve().parents[4] CI_REGISTER_PATH = REPO_ROOT / "python" / "sglang" / "test" / "ci" / "ci_register.py" -VERSION_HELPER_PATH = REPO_ROOT / "python" / "tools" / "get_version_tag.py" +VERSION_HELPER_PATH = REPO_ROOT / "scripts" / "release" / "get_version_tag.py" PYPROJECT_PATHS = [ REPO_ROOT / "python" / "pyproject.toml", REPO_ROOT / "python" / "pyproject_cpu.toml", @@ -16,10 +16,10 @@ PYPROJECT_PATHS = [ REPO_ROOT / "3rdparty" / "amd" / "wheel" / "sglang" / "pyproject.toml", ] DESCRIBE_COMMAND = ( - 'git_describe_command = ["python3", "python/tools/get_version_tag.py"]' + 'git_describe_command = ["python3", "scripts/release/get_version_tag.py"]' ) TAG_ONLY_DESCRIBE_COMMAND = ( - 'git_describe_command = ["python3", "python/tools/get_version_tag.py", ' + 'git_describe_command = ["python3", "scripts/release/get_version_tag.py", ' '"--tag-only"]' ) FALLBACK_VERSION = 'fallback_version = "0.0.0.dev0"'