GitVersion 6.0.0 is not supported due to breaking changes
- Dominant language
- PowerShell
- Stars
- 243
- Forks
- 46
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 1
Description
### Problem description
There are [breaking changes](https://github.com/GitTools/GitVersion/releases/tag/6.0.0) 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
```text
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: https://github.com/viscalyx/PesterConverter/pull/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
```text
n/a
```
### PowerShell version and build the target node is running
```text
n/a
```
### Module version used
```text
n/a
```
Contributor guide
Research direction
Start by reviewing the tasks, configuration, and templates for hardcoded GitVersion properties, especially NuGetVersionV2, then compare them with the linked GitVersion configuration and output-variable documentation. Reproduce a build with GitVersion 6.0.0 and confirm completion when the build succeeds and prerelease values are valid for the module manifest.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100