Skip to content

Commit 1636f6b

Browse files
committed
Fix bump-minor-version to handle version 0.9 correctly
The previous yq expression used floating-point arithmetic to increment the minor version ((0.9 * 10 + 1) / 10 = 1.0), which produced 1.0 instead of the expected 0.10. Replace with awk-based string splitting that treats major and minor as separate integers, preserving the major.minor format across all version numbers. Ref: EC-1705 Signed-off-by: Rob Nester <rnester@redhat.com> Assisted-by: Cursor Made-with: Cursor
1 parent 7ebac6e commit 1636f6b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,9 @@ debug-version:
376376

377377
# It's not so hard to do this by hand, but let's save some typing
378378
bump-minor-version:
379-
@yq '(((. * 10) + 1) / 10)' -i $(VERSION_FILE) && \
379+
@NEW_VERSION=$$(awk -F. '{printf "%s.%d", $$1, $$2+1}' $(VERSION_FILE)) && \
380+
echo "$$NEW_VERSION" > $(VERSION_FILE) && \
380381
git add $(VERSION_FILE) && \
381382
git commit $(VERSION_FILE) \
382-
-m "Bump minor version to $$(cat $(VERSION_FILE))" \
383+
-m "Bump minor version to $$NEW_VERSION" \
383384
-m 'Commit generated with `make bump-minor-version`'

0 commit comments

Comments
 (0)