forked from devmatic-it/debcvescan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 977 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
###############################################################################
# Makefile Go Projects
#
# Author F. Bator
###############################################################################
GOBASE=$(shell pwd)
GOBIN=$(GOBASE)/dist
PKG := "github.com/devmatic-it/debcvescan"
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
all: compile
compile: get build test-coverage security
get:
@echo "Downloading dependencies..."
GOBIN=$(GOBIN) go get github.com/securego/gosec/v2/cmd/gosec
GOBIN=$(GOBIN) go get
security:
@echo "Gosec security scan..."
dist/gosec ./...
build:
@echo "Building binary..."
GOBIN=$(GOBIN) go build -o dist/debcvescan
test-coverage:
@go test -short -coverprofile cover.out -covermode=atomic ${PKG_LIST}
@cat cover.out >> coverage.txt
clean:
@echo "Cleanup dependencies..."
rm -Rf ./src/github.com
rm -Rf ./src/golang.org
rm -Rf ./src/gopkg.in
rm -Rf ./dist/*
rm -f cover.out coverage.txt gosec_report.html