-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (36 loc) · 946 Bytes
/
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
VERSION ?= $(shell git describe --tags --always --dirty="-dev")
all: clean build
v:
@echo "Version: ${VERSION}"
clean:
git clean -fdx
build:
go build -trimpath -ldflags "-s -X cmd.Version=${VERSION} -X main.Version=${VERSION}" -v -o mev-boost-relay .
test:
go test ./...
test-race:
go test -race ./...
lint:
gofmt -d -s .
gofumpt -d -extra .
go vet ./...
staticcheck ./...
golangci-lint run
gofumpt:
gofumpt -l -w -extra .
fmt:
gofmt -s -w .
gofumpt -extra -w .
gci write .
go mod tidy
test-coverage:
go test -race -v -covermode=atomic -coverprofile=coverage.out ./...
go tool cover -func coverage.out
cover-html:
go test -coverprofile=/tmp/boost-relay.cover.tmp ./...
go tool cover -html=/tmp/boost-relay.cover.tmp
unlink /tmp/boost-relay.cover.tmp
docker-image:
DOCKER_BUILDKIT=1 docker build --platform linux/amd64 --build-arg VERSION=${VERSION} . -t flashbots/mev-boost-relay
lt: lint test
flt: fmt lint test