Skip to content

refactor(gitversion-variables): Standardize output variable order#4817

Merged
arturcic merged 1 commit intoGitTools:mainfrom
arturcic:feature/order-gitversion-variable-properties
Feb 11, 2026
Merged

refactor(gitversion-variables): Standardize output variable order#4817
arturcic merged 1 commit intoGitTools:mainfrom
arturcic:feature/order-gitversion-variable-properties

Conversation

@arturcic
Copy link
Member

Reorders GitVersion properties alphabetically across Core, MSBuild, Cake, and documentation for consistency and refines nullability.

Reorders GitVersion properties alphabetically across Core, MSBuild, Cake, and documentation for consistency and refines nullability.
@sonarqubecloud
Copy link

@arturcic arturcic added this to the 6.x milestone Feb 11, 2026
@arturcic arturcic marked this pull request as ready for review February 11, 2026 08:33
Copilot AI review requested due to automatic review settings February 11, 2026 08:33
@arturcic arturcic merged commit 9e85a65 into GitTools:main Feb 11, 2026
128 checks passed
@arturcic arturcic deleted the feature/order-gitversion-variable-properties branch February 11, 2026 08:40
@mergify
Copy link
Contributor

mergify bot commented Feb 11, 2026

Thank you @arturcic for your contribution!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes the ordering of GitVersion output variables (alphabetical) across Core, MSBuild integration, build (Cake) tooling, and documentation, and includes some related nullability/type refinements to better match the JSON output model.

Changes:

  • Reorders MSBuild task outputs/define constants and the Core GitVersionVariables shape to be alphabetical.
  • Updates Core variable construction (VariableProvider) to use named arguments aligned to the new ordering.
  • Aligns build/Cake GitVersion model + docs JSON example/table with the standardized variable ordering and types.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets Reorders MSBuild <Output> mappings and WiX DefineConstants entries alphabetically (also fixes PreReleaseLabelWithDash define).
src/GitVersion.MsBuild/Tasks/GetVersion.cs Reorders [Output] properties to match standardized variable ordering.
src/GitVersion.Core/VersionCalculation/VariableProvider.cs Switches to named-argument construction of GitVersionVariables in alphabetical order.
src/GitVersion.Core/PublicAPI.Unshipped.txt Updates tracked public API entries for GitVersionVariables constructor/deconstruct ordering and nullability.
src/GitVersion.Core/OutputVariables/GitVersionVariables.cs Reorders the public positional record parameters; updates available variables list and internal dictionary mapping.
src/GitVersion.Core.Tests/Helpers/TestableGitVersionVariables.cs Updates test helper instantiation to match the new GitVersionVariables parameter order.
docs/input/docs/reference/variables.md Reorders JSON example and variables table entries to match the standardized ordering.
build/common/Utilities/Models.cs Adjusts build version calculation to handle BuildMetaData as nullable/non-string.
build/common/Addins/GitVersion/GitVersionAliases.cs Minor alias invocation refactor and wording tweak in XML docs.
build/common/Addins/GitVersion/GitVersion.cs Reorders properties and refines types/nullability to better reflect JSON output (e.g., numeric metadata).

@gittools-bot
Copy link
Contributor

🎉 This issue has been resolved in version 6.6.0 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

This was referenced Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments