2017-05-18 20:44:05 +03:00
|
|
|
.PHONY: re
|
|
|
|
re: clean build test
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
@mkdir -p output
|
|
|
|
|
|
|
|
@# proto-gen-go
|
|
|
|
protoc -I./proto --go_out=plugins=grpc:output proto/aaa/aaa.proto
|
|
|
|
protoc -I./proto --go_out=plugins=grpc:output proto/bbb/bbb.proto
|
|
|
|
@rm -rf output/aaa output/bbb
|
2018-09-12 21:29:07 +03:00
|
|
|
@mv output/moul.io/protoc-gen-gotemplate/examples/single-package-mode/output/* output/
|
2017-05-18 20:44:05 +03:00
|
|
|
@rm -rf output/github.com
|
|
|
|
|
|
|
|
@# protoc-gen-gotemplate
|
|
|
|
protoc -I./proto --gotemplate_out=template_dir=templates,single-package-mode=true:output proto/bbb/bbb.proto
|
|
|
|
gofmt -w .
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
go test -i ./output/...
|
|
|
|
go test -v ./output/...
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf output
|