-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (47 loc) · 1.62 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
.PHONY: clean
clean:
\rm -rf bin/*
build: clean
go build -o ./bin/gitsast cmd/main.go
run:
go run cmd/main.go
db:
./bin/gitsast db init
start:
./bin/gitsast api
build-all: clean
GOOS=linux GOARCH=amd64 go build -o ./bin/gitsast-linux-amd64 cmd/main.go
GOOS=linux GOARCH=arm64 go build -o ./bin/gitsast-linux-arm64 cmd/main.go
GOOS=darwin GOARCH=amd64 go build -o ./bin/gitsast-darwin-amd64 cmd/main.go
GOOS=darwin GOARCH=arm64 go build -o ./bin/gitsast-darwin-arm64 cmd/main.go
deps-cleancache:
go clean -modcache
test-unit:
go test ./...
test-coverage:
go test $(go list ./...) -race -covermode atomic -coverprofile=coverage.out ./...
mock:
mockgen -source=internal/repository/service.go \
-package testutil \
-destination=testutil/mocks/repository/service.go
mockgen -source=internal/model/repository.go \
-package testutil \
-destination=testutil/mocks/model/repository.go
mockgen -source=internal/model/report.go \
-package testutil \
-destination=testutil/mocks/model/report.go
mockgen -source=internal/model/rule.go \
-package testutil \
-destination=testutil/mocks/model/rule.go
mockgen -source=internal/queue/handler.go \
-package testutil \
-destination=testutil/mocks/queue/handler.go
mockgen -source=internal/queue/task/analyzer/git/client.go \
-package testutil \
-destination=testutil/mocks/queue/analyzer/client.go
mockgen -source=internal/queue/task/analyzer/detector.go \
-package testutil \
-destination=testutil/mocks/queue/analyzer/detector.go
mockgen -source=internal/queue/task/analyzer/scanner.go \
-package testutil \
-destination=testutil/mocks/queue/analyzer/scanner.go