fix: adding date and fixing release name issue (#15174)

This commit is contained in:
Douglas Yang
2025-12-15 17:11:03 +08:00
committed by GitHub
parent d16ff357db
commit 1e2d753804
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -49,12 +49,14 @@ jobs:
COMMIT_HASH=$(git rev-parse --short HEAD)
COMMIT_COUNT=$(git rev-list --count HEAD)
# Get current date in YYYY-MM-DD format
# Get current date in YYYY-MM-DD format for release tag
BUILD_DATE=$(date -u +%Y-%m-%d)
# Get compact date format for wheel filename (YYYYMMDD)
BUILD_DATE_COMPACT=$(date -u +%Y%m%d)
# Generate nightly version following PEP 440
# Format: {base_version}.dev{commit_count}+g{commit_hash}
NIGHTLY_VERSION="${BASE_VERSION}.dev${COMMIT_COUNT}+g${COMMIT_HASH}"
# Format: {base_version}.dev{commit_count}+{date}.g{commit_hash}
NIGHTLY_VERSION="${BASE_VERSION}.dev${COMMIT_COUNT}+${BUILD_DATE_COMPACT}.g${COMMIT_HASH}"
echo "Base version: ${BASE_VERSION}"
echo "Nightly version: ${NIGHTLY_VERSION}"