Skip to content

Commit

Permalink
Fix version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Aug 30, 2024
1 parent 868a62b commit a9d78e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,17 @@ jobs:
Write-Host "Latest prerelease version is less than the latest stable version, jumping to $currentVersion"
$newPrereleaseTag = "prerelease1"
$newVersion = $currentVersion
} elseif ($latestPrereleaseVersion -eq $currentVersion) {
Write-Host "Latest prerelease version is the same as the latest stable version, jumping to $currentVersion"
$newPrereleaseTag = "prerelease" + (([int]$latestPrereleaseTag) + 1)
$newVersion = $currentVersion
} else {
# Generate a new prerelease name, psgallery only allows characters 'a-zA-Z0-9' and a hyphen ('-') at the beginning of the prerelease string
$newPrereleaseTag = "prerelease" + (([int]$latestPrereleaseTag) + 1)
# Prerelease will always be at least one minor version above the latest published stable version so when it's merged to main the minor version will get bumped
# To bump a major version the manifest would be edited manually to vnext.0.0 before merging to main
$newVersion = [version]::new($latestStableVersion.Major, $latestStableVersion.Minor + 1, 0)
$newVersion = [version]::new($latestPrereleaseVersion.Major, $latestPrereleaseVersion.Minor + 1, 0)
}
if($newVersion -eq $oldVersion) {
Expand Down

0 comments on commit a9d78e7

Please sign in to comment.