mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 05:23:03 +07:00
Fix getting grpc latest tag
This commit is contained in:
parent
62c7ba2bee
commit
790a41a722
@ -14,13 +14,12 @@ add_bazel() {
|
|||||||
|
|
||||||
get_grpc_tag() {
|
get_grpc_tag() {
|
||||||
if [ "$grpc_tag" = "latest" ]; then
|
if [ "$grpc_tag" = "latest" ]; then
|
||||||
grpc_tag=$(get -s -n "" https://grpc.io/release)
|
grpc_tag=$(get -s -n "" https://github.com/grpc/grpc/releases/latest | grep -Eo -m 1 "v[0-9]+\.[0-9]+\.[0-9]+" | head -n 1)
|
||||||
else
|
else
|
||||||
status_code=$(get -v -n /tmp/grpc.tmp "https://github.com/grpc/grpc/releases/tag/v$grpc_tag")
|
if [[ ${grpc_tag:0:1} != "v" ]] ; then grpc_tag="v$grpc_tag"; fi
|
||||||
if [ "$status_code" = "200" ]; then
|
status_code=$(get -v -n /tmp/grpc.tmp "https://github.com/grpc/grpc/releases/tag/$grpc_tag")
|
||||||
grpc_tag="v$grpc_tag"
|
if [ "$status_code" != "200" ]; then
|
||||||
else
|
grpc_tag=$(get -s -n "" https://github.com/grpc/grpc/releases/latest | grep -Eo -m 1 "v[0-9]+\.[0-9]+\.[0-9]+" | head -n 1)
|
||||||
grpc_tag=$(get -s -n "" https://grpc.io/release)
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user