You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

  1. DOCKER_PROTO_BUILDER := docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto
  2. HTTPS_GIT := https://github.com/tendermint/spec.git
  3. ###############################################################################
  4. ### Protobuf ###
  5. ###############################################################################
  6. proto-all: proto-lint proto-check-breaking
  7. .PHONY: proto-all
  8. proto-gen:
  9. @echo "Generating Protobuf files"
  10. @$(DOCKER_PROTO_BUILDER) buf generate --template=./buf.gen.yaml --config ./buf.yaml
  11. .PHONY: proto-gen
  12. proto-lint:
  13. @$(DOCKER_PROTO_BUILDER) buf lint --error-format=json --config ./buf.yaml
  14. .PHONY: proto-lint
  15. proto-format:
  16. @echo "Formatting Protobuf files"
  17. @$(DOCKER_PROTO_BUILDER) find . -name '*.proto' -path "./proto/*" -exec clang-format -i {} \;
  18. .PHONY: proto-format
  19. proto-check-breaking:
  20. @$(DOCKER_PROTO_BUILDER) buf breaking --against .git --config ./buf.yaml
  21. .PHONY: proto-check-breaking
  22. proto-check-breaking-ci:
  23. @$(DOCKER_PROTO_BUILDER) buf breaking --against $(HTTPS_GIT) --config ./buf.yaml
  24. .PHONY: proto-check-breaking-ci