-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
59 lines (44 loc) · 1.1 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
50
51
52
53
54
55
56
57
58
59
## simple makefile to log workflow
.PHONY: all test clean build install
GOFLAGS ?= $(GOFLAGS:)
all: install test
build:
@echo "==== go build ===="
@go build $(GOFLAGS) ./...
install:
@echo "==== install ===="
@go install -ldflags "-X main.Version=${VERSION}" $(GOFLAGS) .
vet:
@echo "==== go vet ===="
@go vet ./...
lint:
@echo "==== go lint ===="
@golint ./**/*.go
test: build vet lint
@echo "==== go test ===="
@go test $(GOFLAGS) ./...
test-integration: install
@echo "==== integration test ===="
@go test -v -tags "integration" ./...
errcheck:
@echo "==== errcheck ===="
@errcheck ./...
cov: install
@echo "==== coverage ===="
$(eval COVER := $(shell mktemp))
@echo $(COVER)
@gotestcover -coverprofile=$(COVER) ./...
@go tool cover -html=$(COVER)
bench: install
@echo "==== bench ===="
@go test -tags "integration" -run=NONE -bench=. $(GOFLAGS) ./...
clean:
@go clean $(GOFLAGS) -i ./...
assets:
@echo "=== production level assets ==="
@gulp assets --production
deploy: install assets
@git add assets
@git commit -m "production level assets"
@echo "=== deploy ==="
@git push wints