Add bv version command group with show and advance subcommands - #313
Conversation
The bespoke CLI framework now supports multi-level subcommands: commands register pipe-separated aliases of space-separated paths (first alias is canonical, segments are lowercased), and the registry arranges them in a tree walked at dispatch time. Settings types can declare positional arguments via the new BvArgumentAttribute; commands can declare a default verbosity, so query commands can default to Minimal and print their deliverable unconditionally via IAnsiConsole. `bv version show` (default subcommand of `bv version`) reports current, latest, and latest stable versions, release flags, and current branch. `bv version advance [CHANGE]` applies a version-spec change to the VERSION file through the same analysis as `bv release` (`--force` skips it), leaving the change uncommitted for review. Closes Tenacom#274. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The property exists to satisfy CA1019; asserting it in the attribute tests also keeps ReSharper from flagging its getter as unused. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@claude please review this PR. |
|
Claude finished @rdeago's task in 3m 57s —— View job Claude finished reviewing this PR
SummaryThis is a solid, well-tested implementation. The command-tree extension to the bespoke CLI framework ( I also verified the service-layer wiring for
Minor observations
Nothing else stood out — style guide adherence (partial classes, extension blocks, line wrapping, BOM/file-format conventions) looks consistent with the rest of the codebase, and the CHANGELOG entry accurately describes the new commands. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thanks for the review! Addressed as follows: Finding 1 — fixed in eb72e71. The required-before-optional invariant is now enforced, not just documented: Finding 2 — intentionally not addressed. Dedicated @claude please take another look. |
|
Claude finished @rdeago's task in 1m 29s —— View job Follow-up review complete
SummaryFinding 1 is properly addressed in
The fix follows the same fail-fast pattern as the pre-existing Finding 2 (no Note: I wasn't able to run Nothing else to flag — this addresses the review feedback well. |
Proposed changes
This is the last phase of #267 (
buildvana.jsonconfiguration and native versioning): abv versioncommand group for working with native versioning outside a release.bv version show(default subcommand, so plainbv versionworks too) prints the computed current version, latest and latest stable published versions, public-release/prerelease flags, and current branch. The report is the command's deliverable: it prints to the console regardless of verbosity, and the command defaults to minimal verbosity so the report is all you get by default (--verbosity normalrestores diagnostics) — the same results-vs-logs separation git/npm/dotnet query commands use.bv version advance [CHANGE]applies a version-spec change (none | unstable | stable | minor | major, same vocabulary asbv release --bump) to theVERSIONfile. By default the request runs through the same analysis asbv release(latest-stable comparison + public API check, honoring--check-public-api/release.checkPublicApi), so barebv version advancemeans "makeVERSIONcomply with SemVer".--forceapplies the request verbatim. The change is left uncommitted for review.To support this, the bespoke CLI framework gained real subcommand support: commands register pipe-separated aliases of space-separated paths (
"version show | version"— first alias canonical, segments lowercased at registration), the registry arranges them in a tree walked at dispatch (children win over positionals; duplicate paths fail fast), settings types declare positional arguments via the newBvArgumentAttribute(<NAME>required,[NAME]optional), and commands can declare a default verbosity. Help pages render SUBCOMMANDS (with a[default]marker) and ARGUMENTS sections.Deltas from the issue text
The issue predates Phase 7's final shape:
VERSIONfile (notcurrent-version.json), and the method isVersionFile.ApplyChange(notApplyVersionSpecChange).--commitwas dropped by design decision: commit-message conventions ([skip ci]placement etc.) vary by host, andgit commitis one command away.Checklist of related issues / discussions
bv versioncommand #274Types of changes
This pull request introduces the following types of changes:
docsdirectory) update.gitattributes,.gitignore)Breaking changes
This pull request introduces breaking changes:
Checklist
🤖 Generated with Claude Code