[Chore] Move version tag helper to release scripts (#35196)
This commit is contained in:
@@ -41,7 +41,7 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
# Use the shared helper so stable/post releases sort above rc tags.
|
# 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
|
if [ -z "$VERSION" ]; then
|
||||||
echo "::error::Could not determine version from git tags"
|
echo "::error::Could not determine version from git tags"
|
||||||
@@ -189,7 +189,7 @@ jobs:
|
|||||||
# id: version
|
# id: version
|
||||||
# run: |
|
# run: |
|
||||||
# # Use the shared helper so stable/post releases sort above rc tags.
|
# # 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
|
# if [ -z "$VERSION" ]; then
|
||||||
# echo "::error::Could not determine version from git tags"
|
# echo "::error::Could not determine version from git tags"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
# Use the shared helper so stable/post releases sort above rc tags.
|
# 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
|
if [ -z "$VERSION" ]; then
|
||||||
echo "::error::Could not determine version from git tags"
|
echo "::error::Could not determine version from git tags"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
# Use the shared helper so stable/post releases sort above rc tags.
|
# 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
|
if [ -z "$VERSION" ]; then
|
||||||
echo "::error::Could not determine version from git tags"
|
echo "::error::Could not determine version from git tags"
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
cd python
|
cd python
|
||||||
cp ../README.md ../LICENSE .
|
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)"
|
HASH="g$(git rev-parse --short HEAD)"
|
||||||
BUILD_DATE=$(date -u +%Y%m%d)
|
BUILD_DATE=$(date -u +%Y%m%d)
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
- name: Generate PR wheel version
|
- name: Generate PR wheel version
|
||||||
id: gen_version
|
id: gen_version
|
||||||
run: |
|
run: |
|
||||||
LATEST_TAG=$(python3 python/tools/get_version_tag.py)
|
LATEST_TAG=$(python3 scripts/release/get_version_tag.py)
|
||||||
BASE_VERSION=${LATEST_TAG#v}
|
BASE_VERSION=${LATEST_TAG#v}
|
||||||
echo "Latest release tag: ${LATEST_TAG}"
|
echo "Latest release tag: ${LATEST_TAG}"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -213,6 +213,6 @@ exclude = [
|
|||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
root = ".."
|
root = ".."
|
||||||
version_file = "sglang/_version.py"
|
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.
|
# Allow editable installs even when .git metadata is not available.
|
||||||
fallback_version = "0.0.0.dev0"
|
fallback_version = "0.0.0.dev0"
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ exclude = [
|
|||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
root = ".."
|
root = ".."
|
||||||
version_file = "sglang/_version.py"
|
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.
|
# Allow editable installs even when .git metadata is not available.
|
||||||
fallback_version = "0.0.0.dev0"
|
fallback_version = "0.0.0.dev0"
|
||||||
|
|
||||||
|
|||||||
@@ -151,6 +151,6 @@ exclude = [
|
|||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
root = ".."
|
root = ".."
|
||||||
version_file = "sglang/_version.py"
|
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.
|
# Allow editable installs even when .git metadata is not available.
|
||||||
fallback_version = "0.0.0.dev0"
|
fallback_version = "0.0.0.dev0"
|
||||||
|
|||||||
@@ -150,6 +150,6 @@ exclude = [
|
|||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
root = ".."
|
root = ".."
|
||||||
version_file = "sglang/_version.py"
|
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.
|
# Allow editable installs even when .git metadata is not available.
|
||||||
fallback_version = "0.0.0.dev0"
|
fallback_version = "0.0.0.dev0"
|
||||||
|
|||||||
@@ -245,6 +245,6 @@ exclude = [
|
|||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
root = ".."
|
root = ".."
|
||||||
version_file = "sglang/_version.py"
|
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.
|
# Allow editable installs even when .git metadata is not available.
|
||||||
fallback_version = "0.0.0.dev0"
|
fallback_version = "0.0.0.dev0"
|
||||||
|
|||||||
@@ -158,6 +158,6 @@ exclude = [
|
|||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
root = ".."
|
root = ".."
|
||||||
version_file = "sglang/_version.py"
|
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.
|
# Allow editable installs even when .git metadata is not available.
|
||||||
fallback_version = "0.0.0.dev0"
|
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
|
# Fetch tags from origin to ensure we have the latest
|
||||||
if git fetch --tags origin; then
|
if git fetch --tags origin; then
|
||||||
# Use the shared helper so stable/post releases sort above rc tags.
|
# 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
|
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"
|
||||||
|
|||||||
@@ -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
|
# Fetch tags from origin to ensure we have the latest
|
||||||
if git fetch --tags origin; then
|
if git fetch --tags origin; then
|
||||||
# Use the shared helper so stable/post releases sort above rc tags.
|
# 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
|
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,7 +6,7 @@ from unittest.mock import patch
|
|||||||
|
|
||||||
REPO_ROOT = Path(__file__).resolve().parents[4]
|
REPO_ROOT = Path(__file__).resolve().parents[4]
|
||||||
CI_REGISTER_PATH = REPO_ROOT / "python" / "sglang" / "test" / "ci" / "ci_register.py"
|
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 = [
|
PYPROJECT_PATHS = [
|
||||||
REPO_ROOT / "python" / "pyproject.toml",
|
REPO_ROOT / "python" / "pyproject.toml",
|
||||||
REPO_ROOT / "python" / "pyproject_cpu.toml",
|
REPO_ROOT / "python" / "pyproject_cpu.toml",
|
||||||
@@ -16,10 +16,10 @@ PYPROJECT_PATHS = [
|
|||||||
REPO_ROOT / "3rdparty" / "amd" / "wheel" / "sglang" / "pyproject.toml",
|
REPO_ROOT / "3rdparty" / "amd" / "wheel" / "sglang" / "pyproject.toml",
|
||||||
]
|
]
|
||||||
DESCRIBE_COMMAND = (
|
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 = (
|
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"]'
|
'"--tag-only"]'
|
||||||
)
|
)
|
||||||
FALLBACK_VERSION = 'fallback_version = "0.0.0.dev0"'
|
FALLBACK_VERSION = 'fallback_version = "0.0.0.dev0"'
|
||||||
|
|||||||
Reference in New Issue
Block a user