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
Describe the bug
GitVersion is not replacing semver when configuration branch has an empty tag. But it is doing the replacement when the configuration branch has a non-empty tag.
Expected Behavior
GitVersion should replace semver when you have an empty tag defined in the configuration branch, and it should not replace when you do not have a tag defined in the configuration branch.
Actual Behavior
GitVersion it is not replacing semver when you have an empty tag defined in the configuration branch.
Possible Fix
After debugged it, it only requires to fix how branchConfigHasPreReleaseTagConfigured is calculated in method FindVersion of NextVersionCalculator class.
// var branchConfigHasPreReleaseTagConfigured = !tag.IsNullOrEmpty();varbranchConfigHasPreReleaseTagConfigured=(tag!=null);
Create a commit on main branch and tag it 1.14.0-rc.
Create releases/1 branch.
Run gitversion and it will return 1.14.0-rc. It is expected to have 1.14.0 as you can see in the configuration, but it returns based on tag in main branch because it doesn't consider as a configured tag when you define an empty string tag.
Update tag in release branch configuration to abc and run gitversion. It will return 1.14.0-abc. In this case, it is considering tag configured as it has a non-empty value.
Context
Can not have releases/1 branch created from main branch with a tag 1.14.0-rc. It obliges to have releases/1.14 and don't increase Minor.
Describe the bug
GitVersion is not replacing semver when configuration branch has an empty tag. But it is doing the replacement when the configuration branch has a non-empty tag.
Expected Behavior
GitVersion should replace semver when you have an empty tag defined in the configuration branch, and it should not replace when you do not have a tag defined in the configuration branch.
Actual Behavior
GitVersion it is not replacing semver when you have an empty tag defined in the configuration branch.
Possible Fix
After debugged it, it only requires to fix how
branchConfigHasPreReleaseTagConfigured
is calculated in method FindVersion of NextVersionCalculator class.Steps to Reproduce
GitVersion.Tool 5.10.3 installed on local.
Content of gitversion.yml
1.14.0-rc
.releases/1
branch.1.14.0-rc
. It is expected to have1.14.0
as you can see in the configuration, but it returns based on tag in main branch because it doesn't consider as a configured tag when you define an empty string tag.abc
and run gitversion. It will return1.14.0-abc
. In this case, it is considering tag configured as it has a non-empty value.Context
Can not have
releases/1
branch created from main branch with a tag1.14.0-rc
. It obliges to havereleases/1.14
and don't increase Minor.This fix will also solve open bug #3060
The text was updated successfully, but these errors were encountered: