diff --git a/Makefile b/Makefile index eab6ec1..27bff9b 100755 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ LINT_DIR = $(OUTPUT_LINT_DIR)/golangci-lint-$(LINT_VERSION)-v$(TRUECLOUDLAB_LINT PROTOC_VERSION ?= 29.2 PROTOC_GEN_GO_VERSION ?= $(shell go list -f '{{.Version}}' -m google.golang.org/protobuf) +PROTOC_GEN_GRPC_GO_VERSION ?= 1.5.1 PROTOC_OS_VERSION=osx-x86_64 ifeq ($(shell uname), Linux) PROTOC_OS_VERSION=linux-x86_64 @@ -44,6 +45,8 @@ protoc-install: @rm $(PROTOBUF_DIR)/protoc-$(PROTOC_VERSION).zip @echo "⇒ Installing protoc-gen-go..." @GOBIN=$(PROTOC_GEN_GO_DIR) go install -v google.golang.org/protobuf/...@$(PROTOC_GEN_GO_VERSION) + @echo "⇒ Installing protoc-gen-go-grpc..." + @GOBIN=$(PROTOC_GEN_GO_DIR) go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@v$(PROTOC_GEN_GRPC_GO_VERSION) # Regenerate code for proto files @@ -56,6 +59,7 @@ protoc: echo "⇒ Processing $$f "; \ $(PROTOC_DIR)/bin/protoc \ --plugin=protoc-gen-go=$(PROTOC_GEN_GO_DIR)/protoc-gen-go \ + --plugin=protoc-gen-go-grpc=$(PROTOC_GEN_GO_DIR)/protoc-gen-go-grpc \ --go_out=. --go_opt=paths=source_relative \ --go_opt=default_api_level=API_HYBRID \ --go-grpc_opt=require_unimplemented_servers=false \