mirror of https://github.com/dapr/cli.git
Modify install script to download release version (#287)
This commit is contained in:
parent
82520e0df8
commit
9a8bda59e2
|
@ -55,7 +55,7 @@ if ($releases.Count -eq 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Filter windows binary and download archive
|
# Filter windows binary and download archive
|
||||||
$windowsAsset = $releases[0].assets | where-object { $_.name -Like "*windows_amd64.zip" }
|
$windowsAsset = $releases | Where-Object { $_.tag_name -notlike "*rc*"} | Select-Object -First 1 | Select-Object -ExpandProperty assets | Where-Object { $_.name -Like "*windows_amd64.zip" }
|
||||||
if (!$windowsAsset) {
|
if (!$windowsAsset) {
|
||||||
throw "Cannot find the windows Dapr CLI binary"
|
throw "Cannot find the windows Dapr CLI binary"
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,9 +90,9 @@ getLatestRelease() {
|
||||||
local latest_release=""
|
local latest_release=""
|
||||||
|
|
||||||
if [ "$DAPR_HTTP_REQUEST_CLI" == "curl" ]; then
|
if [ "$DAPR_HTTP_REQUEST_CLI" == "curl" ]; then
|
||||||
latest_release=$(curl -s $daprReleaseUrl | grep \"tag_name\" | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
|
latest_release=$(curl -s $daprReleaseUrl | grep \"tag_name\" | awk '"![-rc]"' | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
|
||||||
else
|
else
|
||||||
latest_release=$(wget -q --header="Accept: application/json" -O - $daprReleaseUrl | grep \"tag_name\" | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
|
latest_release=$(wget -q --header="Accept: application/json" -O - $daprReleaseUrl | grep \"tag_name\" | awk '"![-rc]"' | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ret_val=$latest_release
|
ret_val=$latest_release
|
||||||
|
|
Loading…
Reference in New Issue