mirror of
https://github.com/anchore/grype
synced 2024-11-10 06:34:13 +00:00
Merge pull request #47 from anchore/add-license-check
Add license validation
This commit is contained in:
commit
8fee8c92ef
2 changed files with 13 additions and 0 deletions
5
.bouncer.yaml
Normal file
5
.bouncer.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
permit:
|
||||
- BSD.*
|
||||
- MIT.*
|
||||
- Apache.*
|
||||
- MPL.*
|
8
Makefile
8
Makefile
|
@ -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)
|
||||
|
@ -49,6 +50,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.2.0
|
||||
|
||||
lint: ## Run gofmt + golangci lint checks
|
||||
$(call title,Running linters)
|
||||
|
@ -92,3 +95,8 @@ build-release: ## Build final release binary
|
|||
-X main.commit="$(git describe --dirty --always)" \
|
||||
-X main.buildTime="$(date --rfc-3339=seconds --utc)"
|
||||
-o dist/vulnscan
|
||||
|
||||
# todo: this should be later used by goreleaser
|
||||
check-licenses:
|
||||
$(TEMPDIR)/bouncer list -o json | tee $(LICENSES_REPORT)
|
||||
$(TEMPDIR)/bouncer check
|
Loading…
Reference in a new issue