[Chore] Move version tag helper to release scripts (#35196)
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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}"
|
||||
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"'
|
||||
|
||||
Reference in New Issue
Block a user