File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ $full_path = Resolve-Path .
3838if (-not $env: DEV_PROXY_VERSION ) {
3939 # Get the latest beta Dev Proxy version
4040 Write-Host " Getting latest beta Dev Proxy version..."
41- $response = Invoke-RestMethod - Uri " https://api.github.com/repos/dotnet/dev-proxy/releases?per_page=1 " - ErrorAction Stop
42- $version = $response [ 0 ]. tag_name
41+ $response = Invoke-RestMethod - Uri " https://api.github.com/repos/dotnet/dev-proxy/releases?per_page=2 " - ErrorAction Stop
42+ $version = $response | Where-Object { $_ .tag_name -like " *-beta* " } | Select-Object - First 1 | Select-Object - ExpandProperty tag_name
4343 Write-Host " Latest beta version is $version "
4444} else {
4545 $version = $env: DEV_PROXY_VERSION
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ set -e # Terminates program immediately if any command below exits with a non-ze
4646if [ $# -eq 0 ]
4747then
4848 echo " Getting latest beta Dev Proxy version..."
49- version=$( curl -s " https://api.github.com/repos/dotnet/dev-proxy/releases?per_page=1 " | awk -F: ' /"tag_name"/ {print $2}' | sed ' s/[", ]//g' )
49+ version=$( curl -s " https://api.github.com/repos/dotnet/dev-proxy/releases?per_page=2 " | awk -F: ' /"tag_name"/ {print $2}' | sed ' s/[", ]//g' | grep -m 1 -- " -beta " )
5050 echo " Latest beta version is $version "
5151else
5252 version=$1
You can’t perform that action at this time.
0 commit comments