mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
add license validation (#80)
This commit is contained in:
@@ -2,6 +2,7 @@ TEMPDIR = ./.tmp
|
||||
RESULTSDIR = $(TEMPDIR)/results
|
||||
COVER_REPORT = $(RESULTSDIR)/cover.report
|
||||
COVER_TOTAL = $(RESULTSDIR)/cover.total
|
||||
LICENSES_REPORT = $(RESULTSDIR)/licenses.json
|
||||
LINTCMD = $(TEMPDIR)/golangci-lint run --tests=false --config .golangci.yaml
|
||||
BOLD := $(shell tput -T linux bold)
|
||||
PURPLE := $(shell tput -T linux setaf 5)
|
||||
@@ -51,6 +52,8 @@ bootstrap: ## Download and install all project dependencies (+ prep tooling in t
|
||||
go get ./...
|
||||
# install golangci-lint
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b .tmp/ v1.26.0
|
||||
# install bouncer
|
||||
curl -sSfL https://raw.githubusercontent.com/wagoodman/go-bouncer/master/bouncer.sh | sh -s -- -b .tmp/ v0.1.0
|
||||
|
||||
lint: ## Run gofmt + golangci lint checks
|
||||
$(call title,Running linters)
|
||||
@@ -100,3 +103,8 @@ build-release: ## Build final release binary
|
||||
-X main.commit="$(git describe --dirty --always)" \
|
||||
-X main.buildTime="$(date --rfc-3339=seconds --utc)"
|
||||
-o dist/imgbom
|
||||
|
||||
# todo: this should by later used by goreleaser
|
||||
check-licenses:
|
||||
$(TEMPDIR)/bouncer list -o json | tee $(LICENSES_REPORT)
|
||||
$(TEMPDIR)/bouncer check
|
||||
Reference in New Issue
Block a user