Skip to content

Commit 64db215

Browse files
committed
fix: Allow test versions to exceed main release version, add debug output --test --v 0.0.8
1 parent 756c00f commit 64db215

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/publish_python.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,23 @@ jobs:
145145
shell: bash
146146
- name: Resolve Release Meta
147147
run: |
148+
echo "Resolving release metadata..."
148149
if [ -n "${{ env.CUSTOM_VERSION }}" ]; then
149150
python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "${{ env.FORCE_RELEASE }}" --version "${{ env.CUSTOM_VERSION }}" >> $GITHUB_ENV
150151
else
151152
python libs/python/tools/release_meta.py --mode "${{ env.RELEASE_MODE }}" --force "${{ env.FORCE_RELEASE }}" >> $GITHUB_ENV
152153
fi
154+
shell: bash
155+
- name: Debug Environment Variables
156+
run: |
157+
echo "=== Release Configuration ==="
158+
echo "PY_VERSION: ${{ env.PY_VERSION }}"
159+
echo "RELEASE_MODE: ${{ env.RELEASE_MODE }}"
160+
echo "SKIP_PUBLISH: ${{ env.SKIP_PUBLISH }}"
161+
echo "PRERELEASE: ${{ env.PRERELEASE }}"
162+
echo "CUSTOM_VERSION: ${{ env.CUSTOM_VERSION }}"
163+
echo "============================"
164+
shell: bash
153165
- name: Set Tag Name
154166
run: |
155167
if [ "${{ env.RELEASE_MODE }}" = "test" ]; then

libs/python/tools/release_meta.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ def main():
8080

8181
main_tag = latest_tag("v", repo_root)
8282
main_version = parse_version(main_tag) if main_tag else None
83-
if main_version and version and version > main_version:
84-
raise RuntimeError("Release note version exceeds main release tag")
83+
# Only check version constraint for actual releases, not test/beta/alpha
84+
if mode == "release" and main_version and version and version <= main_version:
85+
raise RuntimeError(f"Release version {version_str} must be greater than current main tag {main_tag}")
8586

8687
version_str = ".".join(str(x) for x in version)
8788
prerelease = mode in {"test", "beta", "alpha"}

0 commit comments

Comments
 (0)