Skip to content

GitVersion 6.0.0 is not supported due to breaking changes #477

@johlju

Description

@johlju

Problem description

There are breaking changes in GitVersion that fails builds in projects using Sampler. Workaround is to pin an older version.

Notable breaking changes are configuration properties that has changed name, and output properties (NuGetVersionV2) that no longer exist.

Configuration documentation: https://gitversion.net/docs/reference/configuration
Output variables: https://gitversion.net/docs/reference/variables

Verbose logs

You can invoke the tool using the following command: dotnet-gitversion
Tool 'gitversion.tool' (version '6.0.0') was successfully installed.
ConvertFrom-Json : Conversion from JSON failed with error: Error parsing Infinity value. Path '', line 1, position 1.
At D:\a\_temp\87ce70e7-6735-4619-b9cf-c7cfe9c66d84.ps1:5 char:41
+ $gitVersionObject = dotnet-gitversion | ConvertFrom-Json
+                                         ~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
##[error]PowerShell exited with code '1'.

How to reproduce

Build a project using GitVersion v6.0.0

Expected behavior

Sampler supports v6.0.0

Current behavior

Fails if GitVersion 6.0.0 is installeed.

Suggested solution

Update all tasks and configuration (and templates) to use another property than NuGetVersionV2.

Did a quick test in another project to see what was needed when I realized that we have hardcoded NuGetVersionV2 in the tasks. This PR shows the needed config changes: viscalyx/PesterConverter#28

Also, the property used cannot contain '.' in the prerelease string since it is not supported in module manifest. 🤔

Operating system the target node is running

n/a

PowerShell version and build the target node is running

n/a

Module version used

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.help wantedThe issue is up for grabs for anyone in the community.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions