Skip to content

Commit 81d972f

Browse files
authored
Update Directory.Build.props with support for underscores in branch name
1 parent e733294 commit 81d972f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@
126126
<_VersionLabel>$(_VersionLabel.Replace('/merge', ''))</_VersionLabel>
127127
<!-- Finally sanitize the branch with dashes, so we can build path-separated branches, like rel/v1.0.0 or feature/foo -->
128128
<_VersionLabel>$(_VersionLabel.Replace('/', '-'))</_VersionLabel>
129+
<!-- And underscores which are also invalid labels, so we can use branches like dev/feature_foo -->
130+
<_VersionLabel>$(_VersionLabel.Replace('_', '-'))</_VersionLabel>
129131

130132
<!-- Set sanitized version to the actual version suffix used in build/pack -->
131133
<VersionSuffix Condition="!$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</VersionSuffix>

0 commit comments

Comments
 (0)