-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
53 lines (40 loc) · 1.52 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
#!/usr/bin/make -f
all: build plugin
build:
go build -mod=readonly ./cmd/rosetta
plugin:
cd plugins/cosmos-hub && make plugin
plugin-debug:
cd plugins/cosmos-hub && make plugin-debug
docker:
docker build . --tag rosetta
test:
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic ./...
test-rosetta-ci:
sh ./scripts/simapp-start-node.sh
make build && make plugin
./rosetta --blockchain "cosmos" --network "cosmos" --tendermint "tcp://localhost:26657" --addr "localhost:8080" --grpc "localhost:9090" &
sleep 30
export SIMD_BIN=./cosmos-sdk/build/simd && sh ./tests/rosetta-cli/rosetta-cli-test.sh
###############################################################################
### Linting ###
###############################################################################
golangci_version=v1.61.0
golangci_installed_version=$(shell golangci-lint version --format short 2>/dev/null)
#? lint-install: Install golangci-lint
lint-install:
ifneq ($(golangci_installed_version),$(golangci_version))
@echo "--> Installing golangci-lint $(golangci_version)"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
endif
#? lint: Run golangci-lint
lint:
@echo "--> Running linter"
$(MAKE) lint-install
@./scripts/go-lint-all.bash --timeout=15m
#? lint: Run golangci-lint and fix
lint-fix:
@echo "--> Running linter"
$(MAKE) lint-install
@./scripts/go-lint-all.bash --fix
.PHONY: all build rosetta test lint lint-fix