protoc-gen-go-micro/examples/single-package-mode/Makefile
Manfred Touron 4e25b6e83a
Improve imports support (imports lookup)
* Add `--single-package-mode option`
    * Add `getMessageType` helper
    * Add `getProtoFile` helper
    * Add `examples/single-package-mode` example
2017-05-19 09:33:03 +02:00

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