Redirect dev to latest Fulll Release if can't catch prerelease

This commit is contained in:
MyDrift 2024-06-29 15:15:16 +02:00 committed by GitHub
parent b47036630c
commit f838e805f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,9 @@ function Get-LatestRelease {
return $latestRelease.tag_name return $latestRelease.tag_name
} catch { } catch {
Write-Host "Error fetching release data: $_" -ForegroundColor Red Write-Host "Error fetching release data: $_" -ForegroundColor Red
return $null Write-Host "Redirecting to latest Full Release"
$latestRelease = "releases/latest/download"
return $latestRelease.tag_name
} }
} }
@ -37,4 +39,4 @@ function RedirectToLatestPreRelease {
# Call the redirect function # Call the redirect function
RedirectToLatestPreRelease RedirectToLatestPreRelease