Skip to content

Implement versioned calculation and output configuration #5132

Description

@arturcic

Parent: #5131

Follows the release-selector matrix defined by #5135.

Summary

Implement the nested calculation and output configuration model, with separate calculation/output branch sections and version-aware runtime selection.

Configuration structure

  • Add explicit calculation and output configuration models.
  • Move all settings according to the ownership defined by [Feature] Group configuration under calculation and output sections with migration support #5131.
  • Split branch settings between calculation.branches and output.branches.
  • Put custom-version-format and pre-release-weight under output defaults and output.branches.
  • Merge corresponding calculation/output branch entries into effective configuration.
  • Allow output entries for branches supplied by built-in workflows.

Release selection

Implement GITVERSION_CONFIGURATION_VERSION=v6|v7 consistently across CLI, MSBuild, and other entry points:

  • v7.0: unset/empty defaults to v7; explicit v6 enables the temporary flat-format fallback.
  • v7.1: remove v6 runtime loading; v6 produces an actionable migration error and explicit v7 is accepted as a no-op.
  • Values are trimmed and case-insensitive; invalid values fail fast.
  • Detect flat, nested, mixed, empty, and selected-format mismatches.
  • Structure the compatibility validator for removal in v8 by Remove feature-selector environment variables #5136.

Configuration behavior

  • Both formats resolve to equivalent effective configuration in v7.0.
  • Convert built-in workflows and preserve workflow/user precedence.
  • Update builders, inheritance, serialization, --show-config, cache inputs, and public API baselines.

Version-aware --override-config

  • v7 paths include calculation.tag-prefix, calculation.branches.main.increment, output.update-build-number, and output.branches.main.pre-release-weight.
  • v6 mode retains flat override paths.
  • Reject paths from the wrong version with the correct replacement when known.
  • Validate all overrides before applying any and never translate silently.
  • Point users to gitversion config migrate where appropriate.

Acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions