forked from charleenfei/ica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (55 loc) · 2.07 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
#!/usr/bin/make -f
PACKAGES=$(shell go list ./...)
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
###############################################################################
### Install ###
###############################################################################
install: go.sum
@echo "--> Installing icad"
@go install ./cmd/icad
install-debug: go.sum
go build -gcflags="all=-N -l" ./cmd/icad
go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
GO111MODULE=on go mod verify
test:
@go test -mod=readonly $(PACKAGES) -cover
lint:
@echo "--> Running linter"
@golangci-lint run
@go mod verify
###############################################################################
### Protobuf ###
###############################################################################
proto-gen:
@echo "Generating Protobuf files"
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh
proto-lint:
@$(DOCKER_BUF) check lint --error-format=json
###############################################################################
### Initialize ###
###############################################################################
init: kill-dev install
@echo "Initializing both blockchains..."
./network/init.sh
./network/start.sh
@echo "Initializing relayer..."
./network/hermes/hermes-restore-key.sh
./network/hermes/hermes.sh
./network/hermes/start.sh
init-golang-rly: kill-dev install
@echo "Initializing both blockchains..."
./network/init.sh
./network/start.sh
@echo "Initializing relayer..."
./network/relayer/interchain-acc-config/rly.sh
start:
@echo "Starting up test network"
./network/start.sh
start-rly:
./network/hermes/start.sh
kill-dev:
@echo "Killing icad and removing previous data"
-@rm -rf ./data
-@killall icad 2>/dev/null