forked from flashbots/rpc-endpoint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 959 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (22 loc) · 959 Bytes
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
.PHONY: all build test clean lint cover cover-html
GOPATH := $(if $(GOPATH),$(GOPATH),~/go)
GIT_VER := $(shell git describe --tags --always --dirty="-dev")
all: clean build
build:
go build -ldflags "-X main.version=${GIT_VER}" -v -o rpc-endpoint cmd/server/main.go
clean:
rm -rf rpc-endpoint build/
test:
go test ./...
lint:
gofmt -d ./
go vet ./...
staticcheck ./...
cover:
go test -coverpkg=github.com/flashbots/rpc-endpoint/server,github.com/flashbots/rpc-endpoint/types,github.com/flashbots/rpc-endpoint/utils -coverprofile=/tmp/go-rpcendpoint.cover.tmp ./...
go tool cover -func /tmp/go-rpcendpoint.cover.tmp
unlink /tmp/go-rpcendpoint.cover.tmp
cover-html:
go test -coverpkg=github.com/flashbots/rpc-endpoint/server,github.com/flashbots/rpc-endpoint/types,github.com/flashbots/rpc-endpoint/utils -coverprofile=/tmp/go-rpcendpoint.cover.tmp ./...
go tool cover -html=/tmp/go-rpcendpoint.cover.tmp
unlink /tmp/go-rpcendpoint.cover.tmp