Skip to content

Commit

Permalink
Version bump to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Aug 28, 2024
1 parent 2bd9dec commit 4830220
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,20 @@ jobs:
$latestPrereleaseTag = $latestPrereleaseVersion.Split("-prerelease")[1] # format is like -prerelease6, output here is just 6
$latestPrereleaseVersion = [version]$latestPrereleaseVersion.Split("-prerelease")[0]
# 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)
# Jump to package version if it's been bumped beyond the latest prerelease version
$currentVersion = [version]::new($version.Major, $version.Minor, $version.Build)
if ($latestPrereleaseVersion -lt $currentVersion) {
Write-Host "Latest prerelease version is less than the latest stable version, jumping to $currentVersion"
$newPrereleaseTag = "prerelease1"
$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)
# 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)
}
if($newVersion -eq $oldVersion) {
Write-Host "Version is not being bumped in prerelease"
Expand Down
2 changes: 1 addition & 1 deletion PwshSpectreConsole/PwshSpectreConsole.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'PwshSpectreConsole'

# Version number of this module.
ModuleVersion = '1.12.0'
ModuleVersion = '2.0.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down

0 comments on commit 4830220

Please sign in to comment.