forked from flashbots/relayscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (47 loc) · 1.33 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
VERSION := $(shell git describe --tags --always --dirty="-dev")
all: build-portable
v:
@echo "Version: ${VERSION}"
clean:
rm -rf relayscan build/
build:
go build -trimpath -ldflags "-s -X cmd.Version=${VERSION} -X main.Version=${VERSION}" -v -o relayscan .
build-portable:
go build -trimpath -ldflags "-s -X cmd.Version=${VERSION} -X main.Version=${VERSION}" -v -o relayscan .
test:
go test ./...
test-race:
go test -race ./...
lint:
gofmt -d -s .
gofumpt -d -extra .
go vet ./...
staticcheck ./...
golangci-lint run
lt: lint test
gofumpt:
gofumpt -l -w -extra .
fmt:
gofmt -s -w .
gofumpt -extra -w .
gci write .
go mod tidy
cover:
go test -coverprofile=/tmp/go-sim-lb.cover.tmp ./...
go tool cover -func /tmp/go-sim-lb.cover.tmp
unlink /tmp/go-sim-lb.cover.tmp
cover-html:
go test -coverprofile=/tmp/go-sim-lb.cover.tmp ./...
go tool cover -html=/tmp/go-sim-lb.cover.tmp
unlink /tmp/go-sim-lb.cover.tmp
docker-image:
DOCKER_BUILDKIT=1 docker build --platform linux/amd64 --build-arg VERSION=${VERSION} . -t relayscan
generate-ssz:
rm -f common/ultrasoundbid_encoding.go
sszgen --path common --objs UltrasoundStreamBid
update-bids-website:
go run . service bidcollect --build-website --build-website-upload
dev-website:
go run . service website --dev
dev-bids-website:
go run . service bidcollect --devserver