GitVersion: Bug: Branch contains / is not replaced by - in build metadata
GitVersion version: 4.0, 3.6.4
Problem:
Given a branch name contains /, e.g. hotfixes/build-script, the build metadata does not convert it to hyphen. This is not a valid semver 2.
{
"Major":0,
"Minor":2,
"Patch":1,
"PreReleaseTag":"beta.1",
"PreReleaseTagWithDash":"-beta.1",
"PreReleaseLabel":"beta",
"PreReleaseNumber":1,
"BuildMetaData":11,
"BuildMetaDataPadded":"0011",
"FullBuildMetaData":"11.Branch.hotfixes/build-script.Sha.301ff2de375da97133ab544c9561cbd909039877",
"MajorMinorPatch":"0.2.1",
"SemVer":"0.2.1-beta.1",
"LegacySemVer":"0.2.1-beta1",
"LegacySemVerPadded":"0.2.1-beta0001",
"AssemblySemVer":"0.2.1.1",
"FullSemVer":"0.2.1-beta.1+11",
"InformationalVersion":"0.2.1-beta.1+11.Branch.hotfixes/build-script.Sha.301ff2de375da97133ab544c9561cbd909039877",
"BranchName":"hotfixes/build-script",
"Sha":"301ff2de375da97133ab544c9561cbd909039877",
"NuGetVersionV2":"0.2.1-beta0001",
"NuGetVersion":"0.2.1-beta0001",
"CommitsSinceVersionSource":11,
"CommitsSinceVersionSourcePadded":"0011",
"CommitDate":"2018-10-31"
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 24 (23 by maintainers)
Commits related to this issue
- #1520 Replace special chars in InformationalVersion by daches when a custom format is used. — committed to Skoucail/GitVersion by deleted user 4 years ago
@Skoucail, we don’t plan releases, but I suppose we could get a v5.1.4 or 5.2 out the door some time soon.
The fix was included in version 5.0.0. This version has only been released 14d ago. Are you sure you tested the issue with a pre-release version of v5.0.0 and not with v4.x.x?