-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (37 loc) · 908 Bytes
/
Makefile
File metadata and controls
48 lines (37 loc) · 908 Bytes
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
# Go parameters
.PHONY: testall test testl testv coverage threshold lint run depgraph server
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GORUN=$(GOCMD) run .
SERVER=$(GORUN) server
GOCOV=$(GOCMD) tool cover -html=coverage.out
GOTEST=$(GOCMD) test -tags test
GOGET=$(GOCMD) get
GODEP=godepgraph -s -o github.com/webmalc/it-stats-backend github.com/webmalc/it-stats-backend | dot -Tpng -o godepgraph.png
BINARY_NAME=it_stats.app
all: build
build:
$(GOBUILD) -o $(BINARY_NAME) -v
test:
GOENV=test $(GOTEST) ./... -coverprofile=coverage.out
testv:
GOENV=test $(GOTEST) -v ./... -coverprofile=coverage.out
depgraph:
$(GODEP)
coverage:
$(GOCOV)
server:
$(SERVER)
threshold:
overcover --coverprofile coverage.out --threshold 95 --summary
testl: testv lint
testall: test lint threshold
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
lint:
golangci-lint run ./...
golint ./...
run:
$(GORUN)