-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (37 loc) · 915 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
MAKEFLAG += --warn-undefined-variables
PROJECT_BRANCH ?="$(shell git rev-parse --abbrev-ref HEAD)"
PROJECT_SHA ?= $(shell git rev-parse HEAD)
BIN = netboard
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
.PHONY: netboard
netboard:
CGO_ENABLED=1 go build \
-ldflags "-X main.version=$(PROJECT_BRANCH) -X main.commit=$(PROJECT_SHA)" \
-trimpath .
default: netboard
install: netboard
install -d $(BINDIR)
install -s $(BIN) $(BINDIR)
lint:
golangci-lint run \
--timeout=5m \
--disable-all \
--exclude-use-default=false \
--exclude=package-comments \
--exclude=unused-parameter \
--enable=errcheck \
--enable=goimports \
--enable=ineffassign \
--enable=revive \
--enable=unused \
--enable=staticcheck \
--enable=unconvert \
--enable=misspell \
--enable=prealloc \
--enable=nakedret \
--enable=typecheck \
--enable=unparam \
--enable=gosimple \
--enable=nilerr \
./...