Skip to content

Commit 022072a

Browse files
tbitcsoz-agent
andcommitted
fix: dev-release CI uses pyproject.toml version directly (no patch bump)
Previously the workflow read the base version and bumped patch+1, causing 0.2.3 in pyproject.toml to produce 0.2.4.devN instead of 0.2.3.devN. Changed to use the base version as-is so pyproject.toml always reflects the upcoming release and dev builds are correctly named 0.2.3.devN (PEP 440). Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 367b3f0 commit 022072a

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/dev-release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,12 @@ jobs:
4141

4242
- name: Set dev version
4343
run: |
44-
# Read base version and bump patch for dev
44+
# Use pyproject.toml version as the base (no patch bump).
45+
# pyproject.toml should always hold the NEXT release version (e.g. 0.2.3).
46+
# Dev builds publish as 0.2.3.devN — PEP 440 pre-release of the upcoming release.
4547
BASE_VERSION=$(grep 'version = ' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
46-
MAJOR=$(echo $BASE_VERSION | cut -d. -f1)
47-
MINOR=$(echo $BASE_VERSION | cut -d. -f2)
48-
PATCH=$(echo $BASE_VERSION | cut -d. -f3)
49-
NEXT_PATCH=$((PATCH + 1))
5048
COMMIT_COUNT=$(git rev-list --count HEAD ^$(git describe --tags --abbrev=0 2>/dev/null || echo HEAD~100) 2>/dev/null || echo 0)
51-
DEV_VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}.dev${COMMIT_COUNT}"
49+
DEV_VERSION="${BASE_VERSION}.dev${COMMIT_COUNT}"
5250
echo "DEV_VERSION=${DEV_VERSION}" >> $GITHUB_ENV
5351
5452
# Patch pyproject.toml with dev version

0 commit comments

Comments
 (0)