mirror of
https://github.com/wavetermdev/chocolatey.git
synced 2026-08-05 13:47:23 -07:00
Add extra check to make sure tag isn't beta
This commit is contained in:
+3
-3
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user