Skip to content

Commit

Permalink
Won't warn if minor version does exist, but is incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
jessehouwing committed Oct 30, 2023
1 parent fd2bbc1 commit 59499a4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,17 @@ foreach ($majorVersion in $majorVersions)
write-actions-error "::error title=Missing version::Version: v$($majorVersion.major) does not exist and must match: v$($highestPatch.major).$($highestPatch.minor).$($highestPatch.build) ref $patchSha"
}

if ($warnMinor -and -not $minorSha)
if ($warnMinor)
{
write-actions-error "::error title=Missing version::Version: v$($highestMinor.major).$($highestMinor.minor) does not exist must match: v$($highestPatch.major).$($highestPatch.minor).$($highestPatch.build) ref $patchSha"
}
if (-not $minorSha)
{
write-actions-error "::error title=Missing version::Version: v$($highestMinor.major).$($highestMinor.minor) does not exist must match: v$($highestPatch.major).$($highestPatch.minor).$($highestPatch.build) ref $patchSha"
}

if ($minorSha -and ($minorSha -ne $patchSha))
{
write-actions-error "::error title=Incorrect version::Version: v$($highestMinor.major).$($highestMinor.minor) ref $minorSha must match: v$($highestPatch.major).$($highestPatch.minor).$($highestPatch.build) ref $patchSha"
if ($minorSha -and ($minorSha -ne $patchSha))
{
write-actions-error "::error title=Incorrect version::Version: v$($highestMinor.major).$($highestMinor.minor) ref $minorSha must match: v$($highestPatch.major).$($highestPatch.minor).$($highestPatch.build) ref $patchSha"
}
}
}

Expand Down

0 comments on commit 59499a4

Please sign in to comment.