-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 952 Bytes
/
Makefile
File metadata and controls
38 lines (30 loc) · 952 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
.PHONY: all clean test cover travis lint
release:
@echo "Release v$(version)"
@git pull
@git checkout master
@git pull
@git checkout develop
@git flow release start $(version)
@git flow release finish $(version) -p -m "Release v$(version)"
@git checkout develop
@echo "Release v$(version) finished."
all: test
clean:
@go clean -i ./...
coverage.out: $(shell find . -type f -print | grep -v vendor | grep "\.go")
@go test -race -cover -coverprofile ./coverage.out.tmp ./...
@cat ./coverage.out.tmp | grep -v '.pb.go' | grep -v 'mock_' > ./coverage.out
@rm ./coverage.out.tmp
test: coverage.out
.PHONY: lint
lint:
ifeq (, $(shell which golangci-lint))
@echo "Install golangci-lint..."
@curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b ${GOPATH}/bin v1.41.1
endif
@echo "lint..."
@golangci-lint run --timeout=300s ./...
cover: coverage.out
@echo ""
@go tool cover -func ./coverage.out