-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
28 lines (21 loc) · 599 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
LDFLAGS=-ldflags "-s -w"
GO_SRCS := $(shell find . -name *.go)
.PHONY: test
test:
go test -v -short -race -timeout 30s -coverprofile=coverage.txt -covermode=atomic ./...
.PHONY: build
build: trivy-java-db
trivy-java-db: $(GO_SRCS)
go build $(LDFLAGS) ./cmd/trivy-java-db
.PHONY: db-crawl
db-crawl: trivy-java-db
./trivy-java-db --cache-dir ./cache crawl
.PHONY: db-build
db-build: trivy-java-db
./trivy-java-db --cache-dir ./cache build
.PHONY: db-compress
db-compress: cache/*
tar cvzf cache/db/javadb.tar.gz -C cache/db/ trivy-java.db metadata.json
.PHONY: clean
clean:
rm -rf cache/