Add extra check to make sure tag isn't beta

This commit is contained in:
Evan Simkowitz
2024-10-23 11:09:50 -07:00
parent ea30bf3916
commit eb1c2e2c5e
+3 -3
View File
@@ -17,11 +17,11 @@ function global:au_SearchReplace {
function global:au_GetLatest {
$Releases = "https://api.github.com/repos/wavetermdev/waveterm/releases/latest"
$PageSource = Invoke-RestMethod -Uri $Releases
if ($PageSource.tag_name -match 'v([\d.-]+)') {
Write-Host "tag_name=$($PageSource.tag_name)"
if ($PageSource.tag_name -match 'v([\d.]+)(-beta)?' -and 3 -gt $Matches.Count ) {
$Version = $Matches[1]
} else {
throw "Unable to grab tag name"
throw "Tag name does not match regex or is beta"
}
Write-Host "newversion=$($Version)"