add license validation (#80)

This commit is contained in:
Alex Goodman
2020-07-13 13:07:20 -04:00
committed by GitHub
parent 61f51d80bb
commit e8d11eec69
4 changed files with 19 additions and 2 deletions
+8
View File
@@ -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