From db36b200b146af6665f15f143733ab1f65e18ed9 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 10 Sep 2020 10:26:25 +0530 Subject: [PATCH] Fix regex in protoc.sh --- src/scripts/tools/protoc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/tools/protoc.sh b/src/scripts/tools/protoc.sh index c604d62d..5558cbdd 100644 --- a/src/scripts/tools/protoc.sh +++ b/src/scripts/tools/protoc.sh @@ -1,12 +1,12 @@ get_protobuf_tag() { if [ "$protobuf_tag" = "latest" ]; then - protobuf_tag=$(curl "${curl_opts[@]:?}" https://github.com/protocolbuffers/protobuf/releases/latest 2<&1 | grep -m 1 -Eo "(v[0-9]+.[0-9]+.[0-9]+)" | head -n 1) + protobuf_tag=$(curl "${curl_opts[@]:?}" https://github.com/protocolbuffers/protobuf/releases/latest 2<&1 | grep -m 1 -Eo "(v[0-9]+\.[0-9]+\.[0-9]+)" | head -n 1) else status_code=$(sudo curl -s -w "%{http_code}" -o /tmp/protobuf.tmp "${curl_opts[@]:?}" "https://github.com/protocolbuffers/protobuf/releases/tag/v$protobuf_tag") if [ "$status_code" = "200" ]; then protobuf_tag="v$protobuf_tag" else - protobuf_tag=$(curl "${curl_opts[@]:?}" https://github.com/protocolbuffers/protobuf/releases/latest 2<&1 | grep -m 1 -Eo "(v[0-9]+.[0-9]+.[0-9]+)" | head -n 1) + protobuf_tag=$(curl "${curl_opts[@]:?}" https://github.com/protocolbuffers/protobuf/releases/latest 2<&1 | grep -m 1 -Eo "(v[0-9]+\.[0-9]+\.[0-9]+)" | head -n 1) fi fi }