Skip to content

Commit 7902e3d

Browse files
committed
Fix version suffix calculation on release
1 parent 543b011 commit 7902e3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
# Get the version prefix/suffix from the git tag. For example: 'v1.0.0-preview1-final' => '1.0.0' and 'preview1-final'
100100
$segments = $env:GITHUB_REF_NAME -split "-"
101101
$versionPrefix = $segments[0].TrimStart('v')
102-
$versionSuffix = $segments[1..-1] -join "-"
102+
$versionSuffix = $segments.Count -eq 1 ? '' : $segments[1..$($segments.Length-1)] -join '-'
103103
104104
[xml]$xml = Get-Content Directory.Build.props
105105
$configuredVersionPrefix = $xml.Project.PropertyGroup[0].JsonApiDotNetCoreVersionPrefix

0 commit comments

Comments
 (0)