Skip to content

fix: honor --version-bump in the release command - #246

Merged
matt-edmondson merged 2 commits into
mainfrom
fix/release-honors-version-bump
Oct 14, 2026
Merged

matt-edmondson merged 2 commits into
mainfrom
fix/release-honors-version-bump

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Summary

ktsubuild release ignored the dispatch's version bump. It always resolved the version as auto. The shared ktsu dotnet.yml runs ci --no-test --no-release and then release, and only ci receives --version-bump. With a forced bump over commits that all carry [skip ci], the two steps disagreed:

  1. ci opened the version gate, wrote the forced version to VERSION.md, and committed it.
  2. release resolved as auto, closed the gate, and published nothing.

That happened on 2026-10-14 with patch dispatches on ktsu-dev/GitBranchStateCache and ktsu-dev/GitLfsCache. Each run left an Update Metadata commit for 1.0.42 and 1.12.5 on main and logged Skipping release: All commits contain [skip ci] tag.

This PR:

  • adds --version-bump to release and passes it to ResolveVersionAsync. The default stays auto, so existing callers are unchanged.
  • changes the release handler to take a ReleaseOptions record, matching ci's CiOptions.
  • documents the option in README.md and CLAUDE.md.

The shared workflow still has to pass --version-bump to its release step. That's a separate ktsu-dev/.github PR, and it has to merge after this ships, because an older ktsubuild rejects the unknown option.

Test plan

  • New ReleaseCommandTests. A forced patch over [skip ci]-only commits cuts and pushes v3.10.1, while auto still skips and creates no tag. --version-bump validation and its auto default match ci.
  • The new forced-bump test failed before the fix, with no tag -a call.
  • The full suite passes: 867 tests.
  • SonarCloud. The local analyzer build stops on seven errors already on main, in files this PR doesn't touch, so it never reached these files.

🤖 Generated with Claude Code

A workflow that runs ci --no-release and then release forwards its dispatch's
--version-bump to both. release resolved the version as auto regardless. A
forced bump over commits that all carry [skip ci] opens the version gate in ci,
which commits the forced version to VERSION.md, and release then closed the gate
again and published nothing.

release now takes --version-bump and passes it to version resolution, and its
handler takes an options record like ci's.
@matt-edmondson
matt-edmondson merged commit edb3aa0 into main Oct 14, 2026
11 checks passed
@matt-edmondson
matt-edmondson deleted the fix/release-honors-version-bump branch October 14, 2026 05:15
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant