Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ DOCKER_CLI_IMAGE := gcr.io/cloud-builders/docker:20.10.14
# Directory containing installed go binaries.
BIN_DIR := $(GO_DIR)/bin

# Vendered. Use "go get github.com/google/go-licenses" to update.
GO_LICENSES := $(BIN_DIR)/go-licenses

ADDLICENSE_VERSION := v1.1.1
ADDLICENSE := $(BIN_DIR)/addlicense

Expand Down Expand Up @@ -355,8 +358,21 @@ lint-bash:
@./scripts/lint-bash.sh

.PHONY: lint-license
lint-license: buildenv-dirs
./scripts/lint-license.sh
Comment thread
karlkfi marked this conversation as resolved.
# Lints licenses for all packages, even ones just for testing.
lint-license: "$(GO_LICENSES)"
@echo "\"$(GO_LICENSES)\" check \$$(go list all)"
@"$(GO_LICENSES)" check $(shell go list all)

"$(GO_LICENSES)": buildenv-dirs
GOPATH="$(GO_DIR)" go install github.com/google/go-licenses

.PHONY: install-go-licenses
# install go-licenses (user-friendly target alias)
install-go-licenses: "$(GO_LICENSES)"

.PHONY: clean-go-licenses
clean-go-licenses:
@rm -rf $(GO_LICENSES)

"$(ADDLICENSE)": buildenv-dirs
GOPATH="$(GO_DIR)" go install github.com/google/addlicense@$(ADDLICENSE_VERSION)
Expand Down
28 changes: 0 additions & 28 deletions scripts/lint-license.sh

This file was deleted.