diff --git a/GNUmakefile b/GNUmakefile index 7ddb99573..7b190fe30 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -144,7 +144,7 @@ deps: ## Install build and development dependencies go get -u github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs go get -u github.com/a8m/tree/cmd/tree go get -u github.com/magiconair/vendorfmt/cmd/vendorfmt - go get -u github.com/golang/protobuf/protoc-gen-go + @bash -C "$(PROJECT_ROOT)/scripts/install-protoc-gen-go.sh" go get -u gotest.tools/gotestsum .PHONY: lint-deps diff --git a/scripts/install-protoc-gen-go.sh b/scripts/install-protoc-gen-go.sh new file mode 100644 index 000000000..0a84f26b2 --- /dev/null +++ b/scripts/install-protoc-gen-go.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +GIT_TAG="v1.2.0" # change as needed +echo "Installing protobuf/protoc-gen-go@${GIT_TAG} ..." + +# Either fetch in existing repo or use go get to clone +git -C "$(go env GOPATH)"/src/github.com/golang/protobuf fetch -q || go get -d -u github.com/golang/protobuf/protoc-gen-go +git -C "$(go env GOPATH)"/src/github.com/golang/protobuf checkout --quiet $GIT_TAG +go install github.com/golang/protobuf/protoc-gen-go