-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 908 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
ldflags = -X 'main.githash=`git rev-parse --short HEAD`' \
-X 'main.builddate=`date`'
# all builds a binary with the current commit hash
all:
go install -ldflags "$(ldflags)" ./cmd/...
# static is like all, but for static binaries
static:
go install -ldflags "$(ldflags) -s -w -extldflags='-static'" -tags='timetzdata' ./cmd/...
# dev builds a binary with dev constants
dev:
go install -ldflags "$(ldflags)" -tags='dev' ./cmd/...
test:
go test -short ./...
test-long:
go test -v -race ./...
bench:
go test -v -run=XXX -bench=. ./...
lint:
@golangci-lint run \
--enable-all \
--disable=lll \
--disable=gocyclo \
--disable=prealloc \
--disable=interfacer \
--disable=unparam \
--disable=gocritic \
--disable=dupl \
--disable=errcheck \
--disable=wsl \
--disable=gochecknoglobals \
--skip-dirs=internal \
./...
.PHONY: all static dev test test-long bench lint