-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 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
34
35
36
37
38
39
40
41
42
43
44
# Go parameters
.PHONY: testall test testl testv coverage threshold lint run depgraph
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GORUN=$(GOCMD) run .
GOCOV=$(GOCMD) tool cover -html=coverage.out
GOTEST=$(GOCMD) test -tags test
GOGET=$(GOCMD) get
GODEP=godepgraph -s -o github.com/webmalc/services-scrapper github.com/webmalc/services-scrapper | dot -Tpng -o godepgraph.png
BINARY_NAME=ss.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)
threshold:
overcover --coverprofile coverage.out --threshold 90 --summary
testl: testv lint
testall: test lint threshold
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
lint:
golangci-lint run ./...
golint ./...
run:
$(GORUN)