-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 972 Bytes
/
Makefile
File metadata and controls
35 lines (27 loc) · 972 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
MOCKGEN=go run github.com/golang/mock/mockgen
mocks/%_mock.go: $(wildcard $(dir %)/*.go)
${MOCKGEN} \
-destination=$@ \
-package=mocks \
$(shell echo github.com/iarkhanhelsky/check_diff/$(subst mocks/,,$(dir $@)) | ruby -e 'puts gets[0...-2]' ) \
$(shell echo $(subst _mock,,$(basename $(notdir $@))) | ruby -e 'puts gets.capitalize')
mock_clean:
mkdir -p mocks
find mocks -name '*_mock.go' -exec rm {} \;
mockgen: mock_clean \
mocks/pkg/core/checker_mock.go \
mocks/pkg/core/flow_mock.go \
mocks/pkg/unpack/unpacker_mock.go \
mocks/pkg/shell/shell_mock.go \
mocks/pkg/tools/registry_mock.go \
test: mockgen
go test -v -covermode atomic -coverprofile=coverage.out ./pkg/...
go tool cover -html=coverage.out
test_all: mockgen
go test -v -covermode atomic -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
vet:
go vet ./pkg/... ./cmd/...
check: test vet
build:
go build -o target/check_diff .