Skip to content

Commit 276ff5e

Browse files
aksOpsclaude
andcommitted
Use latest stable release tag for beta base version instead of pyproject.toml
Beta versions now derive their base from the latest stable git tag (e.g. v0.0.1 -> 0.0.1-beta.0) instead of reading pyproject.toml. Falls back to pyproject.toml if no stable tags exist. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b2e57f4 commit 276ff5e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/beta.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ jobs:
3333
- name: Compute beta version
3434
id: version
3535
run: |
36-
BASE=$(python3 -c "import tomli; print(tomli.load(open('pyproject.toml','rb'))['project']['version'])")
36+
# Derive base version from latest stable release tag (e.g. v0.0.1 -> 0.0.1)
37+
STABLE_TAG=$(git tag -l "v[0-9]*.[0-9]*.[0-9]*" --sort=-v:refname | grep -v beta | head -n1)
38+
if [ -n "$STABLE_TAG" ]; then
39+
BASE="${STABLE_TAG#v}"
40+
else
41+
BASE=$(python3 -c "import tomli; print(tomli.load(open('pyproject.toml','rb'))['project']['version'])")
42+
fi
3743
# Find latest beta tag number and increment by 1 (starts at 0)
3844
LATEST=$(git tag -l "v${BASE}-beta.*" --sort=-v:refname | head -n1)
3945
if [ -n "$LATEST" ]; then

0 commit comments

Comments
 (0)