-
Notifications
You must be signed in to change notification settings - Fork 352
/
MakefileDoc
33 lines (23 loc) · 1.06 KB
/
MakefileDoc
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
###############################################################################
### Documentation ###
###############################################################################
# include third_party/cosmos-sdk/contrib/devtools/Makefile
DOCKER := $(shell which docker)
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
all: update-swagger-docs
proto-swagger-gen:
@echo "Generating Protobuf Swagger"
$(protoImage) sh ./scripts/protoc-swagger-gen.sh
proto-gen:
@echo "Generating Protobuf files"
$(protoImage) sh ./scripts/protocgen.sh
proto-lint:
@echo "Linting Protobuf files"
@$(protoImage) buf lint ./proto --error-format=json
proto-format:
@echo "Formatting Protobuf files"
@$(protoImage) find ./ -not -path "./third_party/*" -name "*.proto" -exec clang-format -i {} \;
proto-all: proto-format proto-gen proto-swagger-gen
.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint