forked from argoproj/pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 856 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
# lint is memory and CPU intensive, so we can limit on CI to mitigate OOM
LINT_GOGC?=off
LINT_CONCURRENCY?=8
# Set timeout for linter
LINT_DEADLINE?=1m0s
vendor: Gopkg.toml
dep ensure -v -vendor-only
.PHONY: windows-build
windows-build:
GOOS=windows go build ./...
.PHONY: linux-build
linux-build:
GOOS=linux go build ./...
.PHONY: darwin-build
darwin-build:
GOOS=darwin go build ./...
.PHONY: build
build: linux-build windows-build darwin-build
.PHONY: lint
lint: vendor build
# golangci-lint does not do a good job of formatting imports
goimports -local github.com/akshaybhatt14495/pkg -w `find . ! -path './vendor/*' -type f -name '*.go'`
GOGC=$(LINT_GOGC) golangci-lint run --fix --verbose --concurrency $(LINT_CONCURRENCY) --deadline $(LINT_DEADLINE)
.PHONY: test
test: lint
go test -v -covermode=count -coverprofile=coverage.out ./...