Sub-issue of #267. Depends on Phase 1 (#268) and Phase 4 (#271).
Scope
GitService gains height via LibGit2Sharp: commits from HEAD back to (but not including) the last commit that modified current-version.json. Reuse the existing short CurrentBranch.
- Rewrite
VersionService to compute from GitService + Buildvana.Versioning + BuildvanaConfig (release.branches, release.prereleaseTag); delete the nbgv subprocess and JSON-parsing path. Add release.branches/release.prereleaseTag to the config model + schema here (first consumer); enforce "version is prerelease but prereleaseTag absent ⇒ fail the release."
- Switch
VersionFile read/write to current-version.json. Remove the nbgv entry from .config/dotnet-tools.json.
- The repo gains its own
current-version.json + the relevant buildvana.json keys; version.json is retained only for the still-NBGV-based SDK build until Phase 6 publishes.
Acceptance criteria
VersionService no longer references nbgv; .config/dotnet-tools.json no longer lists it.
- Height increases monotonically with commits within a version line and resets at each
current-version.json change; the overall version never regresses.
- A prerelease
current-version.json with no release.prereleaseTag fails the release with a clear message.
dotnet bv release (dry run) and version-consuming commands work without nbgv.
- CHANGELOG: Unreleased entries;
**BREAKING CHANGE** for the version.json → current-version.json migration.
Sub-issue of #267. Depends on Phase 1 (#268) and Phase 4 (#271).
Scope
GitServicegains height via LibGit2Sharp: commits from HEAD back to (but not including) the last commit that modifiedcurrent-version.json. Reuse the existing shortCurrentBranch.VersionServiceto compute fromGitService+Buildvana.Versioning+BuildvanaConfig(release.branches,release.prereleaseTag); delete thenbgvsubprocess and JSON-parsing path. Addrelease.branches/release.prereleaseTagto the config model + schema here (first consumer); enforce "version is prerelease butprereleaseTagabsent ⇒ fail the release."VersionFileread/write tocurrent-version.json. Remove thenbgventry from.config/dotnet-tools.json.current-version.json+ the relevantbuildvana.jsonkeys;version.jsonis retained only for the still-NBGV-based SDK build until Phase 6 publishes.Acceptance criteria
VersionServiceno longer referencesnbgv;.config/dotnet-tools.jsonno longer lists it.current-version.jsonchange; the overall version never regresses.current-version.jsonwith norelease.prereleaseTagfails the release with a clear message.dotnet bv release(dry run) and version-consuming commands work withoutnbgv.**BREAKING CHANGE**for theversion.json→current-version.jsonmigration.