-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
72 lines (52 loc) · 1.73 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
DOCKER := $(shell which docker)
.PHONY: all install go.sum test test-local lint proto-gen proto-gen-local build build-static start publish
all: install
install:
./scripts/build.sh
go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
GO111MODULE=on go mod verify
test:
./scripts/test.sh
test-local:
./scripts/test-local.sh
test-custody:
./scripts/test-custody.sh
# look into .golangci.yml for enabling / disabling linters
lint:
@echo "--> Running linter"
@golangci-lint run
@go mod verify
containerProtoVer=0.14.0
containerProtoImage=ghcr.io/cosmos/proto-builder:$(containerProtoVer)
proto-all: proto-format proto-lint proto-gen
proto-gen:
@echo "Generating Protobuf files"
@$(DOCKER) run --user $(id -u):$(id -g) --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
sh ./scripts/protocgen.sh;
proto-format:
@echo "Formatting Protobuf files"
@$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \
find ./proto -name "*.proto" -exec clang-format -i {} \;
proto-swagger-gen:
@echo "Generating Protobuf Swagger"
@$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
sh ./scripts/protoc-swagger-gen.sh;
proto-lint:
@$(DOCKER_BUF) lint --error-format=json
proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main
build:
./scripts/build.sh
build-static:
./scripts/sbuild.sh
start:
go run ./cmd/sekaid/main.go
# ./scripts/proto-gen.sh
publish:
./scripts/publish.sh
network-start:
./scripts/test-local/network-stop.sh
./scripts/test-local/network-start.sh
network-stop:
./scripts/test-local/network-stop.sh