-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathMakefile
38 lines (26 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
DOCKER := $(shell which docker)
HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git
##### GO commands #####
include go/Makefile
##### Protobuf #####
protoVer=0.11.2
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
##### Rust #####
rustVer=1.70-slim
rustImageName=rust:$(rustVer)
rustImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(rustImageName)
proto-all: proto-format proto-lint proto-gen-go proto-gen-rust
proto-gen-go:
@echo "Generating Protobuf definitons for Go"
@$(protoImage) sh ./scripts/protocgen_go.sh
proto-gen-rust:
@echo "Generating Protobuf definitons for Rust"
@$(rustImage) sh ./scripts/protocgen_rust.sh
proto-format:
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;
proto-lint:
@$(protoImage) buf lint --error-format=json
proto-check-breaking:
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=master
.PHONY: proto-all proto-gen-go proto-gen-rust proto-format proto-lint proto-check-breaking