Skip to content

Commit

Permalink
Prerelease tags should not cause version increment
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2 committed May 3, 2021
1 parent b346bc7 commit 02a8d8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/Get-DetectedCiVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ function Get-VersionPrefixFromTags {
if ($previousTags.Count -gt 0) {
# Head is not tagged, so it would be greater than the most recent tagged version.
$previousVersion = Get-VersionPrefix $previousTags[0]

if ($previousTags[0].Contains('-')) {
# This was a prerelease; we're still building for this version prefix.
return $previousVersion
}

return [version]::new($previousVersion.Major, $previousVersion.Minor, $previousVersion.Build + 1)
}

Expand Down

0 comments on commit 02a8d8f

Please sign in to comment.