Makefile 693 B

123456789101112131415161718192021
  1. PROTO_FILE=api/v1/api.proto
  2. VENDOR_DIR=$(shell echo $$GOPATH | cut -d':' -f1)/src/go-common/vendor
  3. GO_FILES=$(shell find . -name "*.go" -type f)
  4. rundev: build
  5. ./cmd/cmd -conf cmd/dapper-query-example.toml -http tcp://127.0.0.1:8000\?timeout=10s -http.perf tcp://127.0.0.1:6006 -log.v 10 -log.stdout
  6. genapi: $(PROTO_FILE)
  7. protoc -I. -I$(VENDOR_DIR) --gogo_out=plugins=grpc:. $<
  8. protoc -I. -I$(VENDOR_DIR) --bm_out=logtostderr=1,jsonpb=true:. $<
  9. protoc -I. -I$(VENDOR_DIR) --swagger_out=logtostderr=1:. $<
  10. swagger-markdown -i api/v1/api.swagger.json -o api/v1/README.md
  11. build: $(GO_FILES) genapi
  12. go build -o cmd/cmd cmd/main.go
  13. clean:
  14. rm -rf bin/*
  15. .PHONY: genapi build clean rundev