Skip to content

Commit

Permalink
Fix build version order
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie authored Mar 19, 2024
1 parent e87b024 commit 3bf88fb
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 @@ -79,7 +79,11 @@ jobs:
$latestStableVersion = $onlineVersions | Where-Object { $_.Version -notlike "*prerelease*" } | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version
$latestStableVersion = [version]$latestStableVersion
$latestPrereleaseVersion = $onlineVersions | Where-Object { $_.Version -like "*prerelease*" } | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version
$latestPrereleaseVersion = $onlineVersions | Where-Object { $_.Version -like "*prerelease*" } | Sort-Object {
$version = [version]$_.Version.Split("-")[0]
$version = [version]::new($version.Major, $version.Minor, $version.Build, ($_.Version.Split("-")[1] -replace "prerelease", ""))
return $version
} -Descending | Select-Object -First 1 -ExpandProperty Version
$latestPrereleaseTag = $latestPrereleaseVersion.Split("-prerelease")[1] # format is like -prerelease6, output here is just 6
$latestPrereleaseVersion = [version]$latestPrereleaseVersion.Split("-prerelease")[0]
Expand Down

0 comments on commit 3bf88fb

Please sign in to comment.