Skip to content

Commit

Permalink
Fix updateVersion.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleejordan committed Apr 3, 2024
1 parent 431e236 commit ea8d715
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/updateVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ if ($LASTEXITCODE -ne 0) {
throw "There are staged changes in the repository. Please commit or reset them before running this script."
}

if ($SemanticVersion.Major -ne $(Get-Date).Year) {
if ($Version.Major -ne $(Get-Date).Year) {
throw "Major version should be the current year!"
}

if ($SemanticVersion.PreReleaseLabel) {
if ($SemanticVersion.Minor % 2 -eq 0) {
if ($Version.PreReleaseLabel) {
if ($Version.Minor % 2 -eq 0) {
throw "Minor version must be odd for pre-release!"
}
} else {
if ($SemanticVersion.Minor % 2 -ne 0) {
if ($Version.Minor % 2 -ne 0) {
throw "Minor version must be even for pre-release!"
}
}
Expand Down

0 comments on commit ea8d715

Please sign in to comment.