refactor(gitversion-variables): Standardize output variable order#4817
Merged
arturcic merged 1 commit intoGitTools:mainfrom Feb 11, 2026
Merged
Conversation
Reorders GitVersion properties alphabetically across Core, MSBuild, Cake, and documentation for consistency and refines nullability.
|
Contributor
|
Thank you @arturcic for your contribution! |
Contributor
There was a problem hiding this comment.
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
GitVersionVariablesshape to be alphabetical. - Updates Core variable construction (
VariableProvider) to use named arguments aligned to the new ordering. - Aligns build/Cake
GitVersionmodel + 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). |
Contributor
|
🎉 This issue has been resolved in version 6.6.0 🎉 Your GitReleaseManager bot 📦🚀 |
This was referenced Feb 16, 2026
Open
Open
This was referenced Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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