-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
49 lines (44 loc) · 1.21 KB
/
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
45
46
47
48
49
.PHONY: all clean coverage debug-install dependencies fmt generate install lint markdown test testverbose tools
export ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
export PKG := github.com/zimmski/tavor
export ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
all: dependencies install test
clean:
go clean -i ./...
go clean -i -race ./...
coverage:
go test -coverprofile=coverage.out
go tool cover -html=coverage.out
crosscompile:
gox -os="linux" ./...
debug-install: clean
go install -race -v ./...
dependencies:
go get -t -v ./...
go build -v ./...
fmt:
gofmt -l -w $(ROOT_DIR)/
generate:
go generate ./...
install:
go install -v ./...
lint: install fmt
$(ROOT_DIR)/scripts/lint.sh
markdown:
orange
test:
go test -race ./...
testverbose:
go test -race -v ./...
tools:
# generation
go get -u -v golang.org/x/tools/cmd/stringer
# linting
go get -u -v golang.org/x/lint/golint/...
go get -u -v github.com/kisielk/errcheck/...
go get -u -v honnef.co/go/tools/cmd/megacheck
# code coverage
go get -u -v golang.org/x/tools/cmd/cover
go get -u -v github.com/onsi/ginkgo/ginkgo/...
go get -u -v github.com/modocache/gover/...
go get -u -v github.com/mattn/goveralls/...