Skip to content

Versioning Phase 5 — native version computation in bv, drop nbgv #272

@rdeago

Description

@rdeago

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.jsoncurrent-version.json migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement[issue/PR] requests / implements new or improved functionality.refactor[issue/PR] requests / implements a refactor of existing code without affecting functionality.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions