Makefile 681 B

123456789101112131415161718192021222324252627282930
  1. # Makefile for broad-announce
  2. #
  3. # Dev targets:
  4. # make proto — regenerate Go stubs from .proto files
  5. # make vet — run go vet on all packages
  6. # make build — build all binaries
  7. # make test — run unit tests
  8. .PHONY: proto vet build test
  9. PROTO_DIR := proto
  10. GEN_DIR := gen/go
  11. BUF := buf
  12. # proto regenerates the Go stubs from .proto sources.
  13. # Run this whenever you edit anything under proto/.
  14. proto:
  15. cd $(PROTO_DIR) && \
  16. $(BUF) lint --config $(PROTO_DIR)/buf.yaml . && \
  17. $(BUF) generate --template $(PROTO_DIR)/buf.gen.yaml $(PROTO_DIR)/
  18. go build ./$(GEN_DIR)/...
  19. vet:
  20. go vet ./...
  21. build:
  22. go build ./cmd/...
  23. test:
  24. go test ./...