2017-05-02 00:55:55 +03:00
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
mkdir -p output
|
|
|
|
|
|
|
|
# generate pb.go inluding imported proto
|
2018-09-12 21:29:07 +03:00
|
|
|
protoc --go_out=Mproto/common.proto=moul.io/protoc-gen-gotemplate/examples/import/output/models/common:./output proto/article.proto
|
2017-05-02 00:55:55 +03:00
|
|
|
protoc --go_out=,plugins=grpc:./output proto/common.proto
|
|
|
|
|
|
|
|
# build our go file based on our template
|
|
|
|
protoc -I. --gotemplate_out=template_dir=templates,debug=true:output proto/article.proto
|
|
|
|
|
|
|
|
.PHONY: re
|
|
|
|
re: clean build
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf output
|