-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 891 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
.PHONY: all clean test cover travis lint
PROTO_FILES := $(shell find . -type f -name '*.proto')
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 -timeout 30s ./...
@cat ./coverage.out.tmp | grep -v '.pb.go' | grep -v 'mock_' > ./coverage.out
@rm ./coverage.out.tmp
test: coverage.out
lint:
@golangci-lint run
cover: coverage.out
@echo ""
@go tool cover -func ./coverage.out
.PHONY: proto
proto: $(PROTO_FILES)
@echo "Building $@..."
@buf build
@buf generate
cert:
$(MAKE) -C ./certs