From 15b3a0fa22804f46a153878e843496e4b0a63ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jorge=20Lopes?= Date: Mon, 15 Jun 2026 09:49:32 +0100 Subject: [PATCH] fix(release): chore/docs-only ranges yield none (revert #38 patch floor) _parse_conventional_commits classified a chore-only commit range as a patch bump instead of none, so chore/docs/refactor-only merges cut a release. The "patch floor" added in #38 (2b693ab) flipped any none bump to patch to keep "merge = release", but that contradicts conventional- commit rules, the documented release process, and the test at release.bats:66 (present since the parser's first commit 81558d2) which was never updated and started failing. Remove the patch floor: only feat/fix/breaking cut a release. A chore/docs-only range returns none. To force a release for an otherwise non-releasable range, dispatch release.yml with bump_override (the escape hatch #38 was working around). Also fix the stale test 14 (bump_all_versions): #38 changed the command badge format from [devflow vX.Y.Z] to bare [X.Y.Z], but the fixture (description: "[devflow v0.1.0]...") and its grep ([devflow v0.2.0]) were not updated, so the sed never matched and the badge assertion failed under bats. Aligned the fixture + grep to the bare [X.Y.Z] format used by the real devflow-plugin/commands/*.md files. bats tests/unit/release.bats: 16/16 green. Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/release.sh | 10 ++++------ tests/unit/release.bats | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/release.sh b/lib/release.sh index cad1fe1..a570b34 100644 --- a/lib/release.sh +++ b/lib/release.sh @@ -84,12 +84,10 @@ _parse_conventional_commits() { done < <(git -C "$project_dir" log "$log_target" --format='%B%x00' 2>/dev/null) IFS="$IFS_SAVE" - # Patch floor: any non-[skip release] merge that has commits cuts AT LEAST a - # patch, so docs/chore/refactor/etc. merges still release (keeps "merge = - # release"). The empty-range and [skip release] cases already returned "none". - if [[ "$bump" == "none" ]]; then - bump="patch" - fi + # No patch floor: docs/chore/refactor/test/ci/style/perf-only ranges yield + # "none" (no release), matching conventional-commit rules and the documented + # release process. Only feat/fix/breaking cut a release. To force a release for + # an otherwise-non-releasable range, dispatch release.yml with bump_override. # Output echo "$bump" diff --git a/tests/unit/release.bats b/tests/unit/release.bats index e7f04a3..224b999 100644 --- a/tests/unit/release.bats +++ b/tests/unit/release.bats @@ -161,7 +161,7 @@ PJ MJ cat > "$proj/devflow-plugin/commands/test-cmd.md" <<'CMD' --- -description: "[devflow v0.1.0] Test command" +description: [0.1.0] Test command --- CMD @@ -177,7 +177,7 @@ CMD assert_success run grep '"version": "0.2.0"' "$proj/devflow-plugin/.claude-plugin/marketplace.json" assert_success - run grep '\[devflow v0.2.0\]' "$proj/devflow-plugin/commands/test-cmd.md" + run grep '\[0.2.0\]' "$proj/devflow-plugin/commands/test-cmd.md" assert_success }