forked from sentinel-official/dvpn-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 971 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
PACKAGES := $(shell go list ./...)
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
BUILD_TAGS := $(strip netgo)
LD_FLAGS := -s -w \
-X github.com/cosmos/cosmos-sdk/version.Name=sentinel \
-X github.com/cosmos/cosmos-sdk/version.AppName=sentinelnode \
-X github.com/cosmos/cosmos-sdk/version.Version=${VERSION} \
-X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \
-X github.com/cosmos/cosmos-sdk/version.BuildTags=${BUILD_TAGS}
.PHONY: benchmark
benchmark:
@go test -mod=readonly -v -bench= ${PACKAGES}
.PHONY: clean
clean:
rm -rf ./build
.PHONY: install
install:
go build -mod=readonly -tags="${BUILD_TAGS}" -ldflags="${LD_FLAGS}" \
-o ${GOPATH}/bin/sentinelnode main.go
.PHONY: go-lint
go-lint:
@golangci-lint run --fix
.PHONY: test
test:
@go test -mod=readonly -v -cover ${PACKAGES}
.PHONY: tools
tools:
@go install github.com/golangci/golangci-lint/cmd/[email protected]