-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance: make sure protoc-gen-go v2 will be used to generate pb msg
Signed-off-by: Wei Liu <[email protected]>
- Loading branch information
1 parent
5e04552
commit dea0794
Showing
7 changed files
with
18,506 additions
and
10,162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ PWD := $(shell pwd) | |
GOPATH := $(shell $(GO) env GOPATH) | ||
PROTOC := $(shell which protoc) | ||
PROTOC_VER := $(shell protoc --version) | ||
PROTOC_GEN_GO := $(shell which protoc-gen-go) | ||
|
||
all: generate-proto | ||
|
||
|
@@ -11,6 +12,8 @@ build: | |
|
||
generate-proto: export protoc:=${PWD}/cmake-build/protobuf/protobuf-build/protoc | ||
generate-proto: build | ||
@echo "Generate proto files" | ||
@echo "Clean old version protoc-gen-go $(PROTOC_GEN_GO)" && rm -f $(PROTOC_GEN_GO) | ||
@which protoc-gen-go 1>/dev/null || (echo "Installing protoc-gen-go" && go install google.golang.org/protobuf/cmd/[email protected]) | ||
@which protoc-gen-go-grpc 1>/dev/null || (echo "Installing protoc-gen-go-grpc" && go install google.golang.org/grpc/cmd/[email protected]) | ||
@(env bash $(PWD)/scripts/proto_gen_go.sh) | ||
|
Oops, something went wrong.