You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The warning "Multiple branch configurations match the current branch" should not appear with /verbosity quiet
The warning should be written to StdErr so capturing gitversion shouldnt break.
Actual Behavior
Parsing the json output of gitversion fails if there is a branch that matches more than one branch regex
PS C:\git\aa> $version = dotnet-gitversion | Convertfrom-Json
ConvertFrom-Json: Conversion from JSON failed with error: Unexpected character encountered while parsing value: M. Path '', line 0, position 0.
PS C:\git\aa> $version = dotnet-gitversion | Convertfrom-Json
PS C:\git\aa> $version = dotnet-gitversion /nocache| Convertfrom-Json
ConvertFrom-Json: Conversion from JSON failed with error: Unexpected character encountered while parsing value: M. Path '', line 0, position 0.
Possible Fix
Steps to Reproduce
Run in powershell for multiline support
md test
cd test
git init
echo "mode: Mainlinebranches: master: regex: '^master$|^main$' other: mode: ContinuousDelivery regex: '^(?!master$|^main$/).*$' # All branches except main, master tag: '{BranchName}' # Shall have a prerelease tag based on the branch name. source-branches: ['main', 'master'] increment: patch"> .\GitVersion.yml
git add .
git commit -m "Added gitversion"
dotnet-gitversion
{
"Major": 0,"Minor": 1,"Patch": 1,
...
}
git checkout -B feature/hello
dotnet-gitversion
Multiple branch configurations match the current branch branchName of 'feature/a'. Using the first matching configuration,'other'. Matching configurations include:' - other - feature'
{
"Major": 0,"Minor": 1,"Patch": 1,
}
If you run the steps in 6.0.0-beta-3 you will first find this issue:
Could not build the configuration instance because following exception occurred: 'Property 'tag' not found on type 'GitVersion.Configuration.BranchConfiguration'.' Please ensure that the /overrideconfig parameters are correct and the configuration file is in the correct format.
I'm worried I couldnt find the breaking change reason, fix or workaround by digging around the docs or doing a quick look at the releases. This change will break a lot of customers. Maybe it's time to setup a 6.x migration guide.
Regarding the warning: It no longer ocurrs in 6.x since the warning was removed: diff
Describe the bug
Actual Behavior
Parsing the json output of gitversion fails if there is a branch that matches more than one branch regex
Possible Fix
Steps to Reproduce
Run in powershell for multiline support
Context
Your Environment
The text was updated successfully, but these errors were encountered: