4e25b6e83a
* Add `--single-package-mode option` * Add `getMessageType` helper * Add `getProtoFile` helper * Add `examples/single-package-mode` example
27 lines
634 B
Makefile
27 lines
634 B
Makefile
.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
|
|
@mv output/github.com/moul/protoc-gen-gotemplate/examples/single-package-mode/output/* output/
|
|
@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
|