You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose version inspection and advancement as a first-class bv command, independent of the release workflow.
Scope
Add bv version show and bv version advance <major|minor|stable|unstable>.
show prints: current version string, latest version, latest stable version, IsPublicRelease, IsPrerelease, current branch. A --json flag would dump the same data as a machine-readable object (consider for follow-up if scope grows).
advance loads VersionFile, applies ApplyVersionSpecChange(kind), saves version.json. A --commit flag (off by default) creates a commit with a conventional message; without it, the file is modified on disk for the user to review and commit manually.
CLI shape depends on the state of the Cake.Frosting removal proposal:
If Cake is still in place: add flat tasks VersionShowTask / VersionAdvanceTask (CLI: bv version-show, bv version-advance <kind>). The current CommandLineParser does not support bv <task> <subcommand>.
If Cake has been removed (i.e., if Drop Cake.Frosting from Buildvana.Tool #228 has been completed): add a Spectre.Console.Cli branch command (bv version show, bv version advance <kind>) with shared settings for --verbosity etc.
The underlying logic is identical in both cases; only dispatch differs.
Reuse the existing VersionFile.ApplyVersionSpecChange and VersionService.ComputeVersionSpecChange without modification where possible.
Add help text and usage examples consistent with the rest of bv's help output.
Acceptance criteria
dotnet bv version show (or version-show) prints the current version info without needing nbgv installed.
dotnet bv version advance minor (or version-advance minor) rewrites version.json with the bumped spec; subsequent bv version show reflects the change.
--commit creates a well-formed commit when passed; absent the flag, the working tree is modified and left for the user.
No regression in bv release, which internally invokes the same underlying version-advance logic.
Sub-issue of #229. Depends on Phase 1.
Expose version inspection and advancement as a first-class
bvcommand, independent of the release workflow.Scope
bv version showandbv version advance <major|minor|stable|unstable>.showprints: current version string, latest version, latest stable version,IsPublicRelease,IsPrerelease, current branch. A--jsonflag would dump the same data as a machine-readable object (consider for follow-up if scope grows).advanceloadsVersionFile, appliesApplyVersionSpecChange(kind), savesversion.json. A--commitflag (off by default) creates a commit with a conventional message; without it, the file is modified on disk for the user to review and commit manually.Cake.Frostingremoval proposal:VersionShowTask/VersionAdvanceTask(CLI:bv version-show,bv version-advance <kind>). The currentCommandLineParserdoes not supportbv <task> <subcommand>.bv version show,bv version advance <kind>) with shared settings for--verbosityetc.VersionFile.ApplyVersionSpecChangeandVersionService.ComputeVersionSpecChangewithout modification where possible.bv's help output.Acceptance criteria
dotnet bv version show(orversion-show) prints the current version info without needingnbgvinstalled.dotnet bv version advance minor(orversion-advance minor) rewritesversion.jsonwith the bumped spec; subsequentbv version showreflects the change.--commitcreates a well-formed commit when passed; absent the flag, the working tree is modified and left for the user.bv release, which internally invokes the same underlying version-advance logic.