-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
55 lines (40 loc) · 1.24 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
#!/usr/bin/make -f
all: clean test build install lint
# The below include contains the tools and runsim targets.
include contrib/devtools/Makefile
########################################
### Build
build: go.sum
@go build -mod=readonly ./...
########################################
### Tools & dependencies
go-mod-cache: go.sum
@echo "--> Download go modules to local cache"
@go mod download
.PHONY: go-mod-cache
go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
@go mod verify
@go mod tidy
build_test_container:
docker-compose -f ./deploy/test/docker-compose.yml --project-directory . build
start_test_containers:
docker-compose -f ./deploy/test/docker-compose.yml --project-directory . up
stop_test_containers:
docker-compose -f ./deploy/test/docker-compose.yml --project-directory . down
clean:
rm -f ebd
rm -f ebcli
rm -f ebrelayer
install:
go install ./cmd/ebd
go install ./cmd/ebcli
go install ./cmd/ebrelayer
lint:
@echo "--> Running linter"
golangci-lint run
@find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
go mod verify
test:
go test ./...
.PHONY: all build go-mod-cache build_test_container start_test_containers stop_test_containers clean install test lint all