From 9e33c7b24e0b1044916a401f7ab4862fba3980cd Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sat, 26 Mar 2022 00:10:00 +0530 Subject: [PATCH] Fix protoc setup --- src/scripts/tools/protoc.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/tools/protoc.ps1 b/src/scripts/tools/protoc.ps1 index a1fb4182..3b51b2fe 100644 --- a/src/scripts/tools/protoc.ps1 +++ b/src/scripts/tools/protoc.ps1 @@ -1,6 +1,6 @@ Function Get-ProtobufTag() { if("$protobuf_tag" -eq "latest") { - $protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/tags).Name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1 + $protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/releases).tag_name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1 } else { try { [net.httpWebRequest] $request = [net.webRequest]::create("https://github.com/protocolbuffers/protobuf/releases/tag/v$protobuf_tag") @@ -9,7 +9,7 @@ Function Get-ProtobufTag() { $response.Close() $protobuf_tag = "v$protobuf_tag" } catch { - $protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/tags).Name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1 + $protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/releases).tag_name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1 } } return $protobuf_tag