From 866ebf7e990617dff3998aca4703c951f1be5f90 Mon Sep 17 00:00:00 2001 From: Walt Askew Date: Wed, 9 Aug 2023 15:54:38 -0700 Subject: [PATCH] Upgrade protoc-gen-go Version - Don't skip the `go install` for `protoc-gen-go` if it's already installed. The `go install` command is still needed to upgrade the `protoc-gen-go` version if it's already installed but at an older version. PiperOrigin-RevId: 555300373 --- go/generate_go_protos_default.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/go/generate_go_protos_default.sh b/go/generate_go_protos_default.sh index 71ab9e7cb..0568775c0 100755 --- a/go/generate_go_protos_default.sh +++ b/go/generate_go_protos_default.sh @@ -38,9 +38,7 @@ if ! [ -x "$(command -v protoc)" ]; then echo 'protoc missing, please install the protobuf compiler. On linux: sudo apt install -y protobuf-compiler' fi -if ! [ -x "$(command -v protoc-gen-go)" ]; then - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.29.0 - PATH=$PATH:$GOBIN -fi +go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.29.0 +PATH=$PATH:$GOBIN bazel run //go:generate_go_protos -- --repo-path=.