Skip to content

Replacing GitVersion 5 with 6 - #529

Draft
raandree wants to merge 40 commits into
gaelcolas:mainfrom
raandree:feature/gitversion6
Draft

Replacing GitVersion 5 with 6#529
raandree wants to merge 40 commits into
gaelcolas:mainfrom
raandree:feature/gitversion6

Conversation

@raandree

@raandree raandree commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Pull Request

Pull Request (PR) description

The is a breaking change that replaces the GitVersion 5 support with GitVersion 6. The schema for 6.3 is not compatible with 5.12.

GitVersion 6 does no longer support zero-padded versions like 3.0.1-preview0001, instead it looks like 3.0.1-preview.1 (FullSemVer). To be compatible with NuGet 2.0 (PowerShell, Chocolatey), the build task GitVersion does the padding for pre-releases.

References:

Added

  • Added support for GitVersion 6 (Breaking Change).
    • Updated GitVersion.yml config file.
    • Removed the GitVersion task in Azure DevOps pipeline.
    • Added a task to the Azure DevOps pipeline to Install GitVersion.
    • Added a new build task to Sampler: GitVersion.
    • Updated Get-SamplerBuildVersion to be compatible with GitVersion 6.
    • Updated Get-SamplerBuildVersion Pester tests.
    • Changed README.md.

Changed

  • Set GitVersion mode to Manual Deployment .

    "Having not the necessity to deploy the build artifacts on every commit is an indication of using the Manual Deployment mode. This mode can be used to remain on the same pre-released version until it has been deployed dedicatedly.

  • Updated GitVersion.yml config file to work with GitVersion 6.

Task list

  • The PR represents a single logical change. i.e. Cosmetic updates should go in different PRs.
  • Added an entry under the Unreleased section of in the CHANGELOG.md as per format.
  • Local clean build passes without issue or fail tests (build.ps1 -ResolveDependency).
  • Documentation added/updated in README.md.
  • Comment-based help added/updated.
  • Localization strings added/updated in all localization files as appropriate.
  • Unit tests added/updated. See DSC Community Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Community Testing Guidelines.
  • New/changed code adheres to DSC Community Style Guidelines.

This change is Reviewable

@gaelcolas gaelcolas left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Do we have to make it a breaking change?
If the template is not the same that's fine, but I feel existing repos can continue to work with gitversion v5.
There's another couple of points I'd like to discuss to clarify, but generally I think the way it works is ok.
Let's discuss...

Comment thread Sampler/Public/Get-SamplerBuildVersion.ps1
Comment thread Sampler/Public/Get-SamplerBuildVersion.ps1 Outdated
@raandree

Copy link
Copy Markdown
Contributor Author

Do we have to make it a breaking change? If the template is not the same that's fine, but I feel existing repos can continue to work with gitversion v5. There's another couple of points I'd like to discuss to clarify, but generally I think the way it works is ok. Let's discuss...

Right, in this way it is not a breaking change. GitVersion 6 will only be used by projects created after the change.

@raandree

Copy link
Copy Markdown
Contributor Author

@gaelcolas, I have done the changes that we have discussed.

@raandree raandree changed the title BREAKING CHANGE: Replacing GitVersion 5 with 6 Replacing GitVersion 5 with 6 Apr 18, 2026
@johlju

johlju commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

… branch label

The version-bump-message regexes were missing the '+semver:' prefix,
causing any commit containing words like 'breaking' or 'feature' to
trigger unintended Major/Minor bumps (e.g. 0.114.0 -> 1.0.0).

The feature branch regex lacked the (?<BranchName>.+) named capture
group, so the '{BranchName}' label token was never resolved.

Changes:
- Add '\+semver:' prefix to major/minor/patch-version-bump-message
- Fix feature branch regex to '^features?[\/-](?<BranchName>.+)'
fix: pin Plaster to 1.1.4 to avoid breaking change in 2.0.0

Plaster 2.0.0 (published 2026-04-13) removed the internal function
'GetPlasterManifestPathForCulture', which breaks Add-Sample's dynamic
parameter resolution and causes the 'SourceDirectory' parameter to
not be found during tests.
```
@raandree
raandree requested a review from gaelcolas April 18, 2026 17:06
@raandree

Copy link
Copy Markdown
Contributor Author

@gaelcolas, I have rebased the branch. Can you have a look at it, please?

@johlju

johlju commented Apr 19, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@gaelcolas

Copy link
Copy Markdown
Owner

FTR, I'll discuss with @raandree what to do as I'd rather avoid a breaking change, but updating a task would be good, or alternatively have the task pick up the version and decide on the behaviour.

@raandree
raandree marked this pull request as draft April 20, 2026 11:47
…on an AzDo agent

Guard the ##vso[task.setvariable] and ##vso[build.updatebuildnumber] writes with a check for $env:TF_BUILD so local builds don't emit noisy Azure DevOps logging commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants