Skip to content

Commit

Permalink
[make] download addlicense
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed Mar 8, 2024
1 parent 6959c4d commit 46bd8f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ test: manifests generate fmt vet envtest gcov2lcov ## Run tests.
$(GCOV2LCOV) -infile cover.out -outfile lcov.info

.PHONY: lint
lint: ## Run linters
addlicense -c Hedgehog -ignore ".github/**" -ignore "config/**" -y 2023 .
lint: addlicense ## Run linters
$(ADDLICENSE) -c Hedgehog -ignore ".github/**" -ignore "config/**" -y 2023 .

##@ Build

Expand Down
10 changes: 8 additions & 2 deletions hack/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ HELM ?= $(LOCALBIN)/helm
HELMIFY ?= $(LOCALBIN)/helmify
ORAS ?= $(LOCALBIN)/oras
GCOV2LCOV ?= $(LOCALBIN)/gcov2lcov
ADDLICENSE ?= $(LOCALBIN)/addlicense

## Tool Versions
KUSTOMIZE_VERSION ?= v5.0.1
Expand All @@ -79,7 +80,7 @@ ORAS_VERSION ?= v1.0.1
GCOV2LCOV_VERSION ?= v1.0.6

.PHONY: tools
tools: kustomize controller-gen envtest envtest-k8s kubevious crd-ref-docs actionlint helm helmify oras ## Prepare all tools
tools: kustomize controller-gen envtest envtest-k8s kubevious crd-ref-docs actionlint helm helmify oras gcov2lcov addlicense ## Prepare all tools

# TODO: Enable back version check when it'll start returning version instead of (devel)
.PHONY: kustomize
Expand Down Expand Up @@ -143,4 +144,9 @@ $(ORAS): $(LOCALBIN)
.PHONY: gcov2lcov
gcov2lcov: $(GCOV2LCOV) ## Download gcov2lcov locally if necessary.
$(GCOV2LCOV): $(LOCALBIN)
test -s $(LOCALBIN)/gcov2lcov || GOBIN=$(LOCALBIN) go install github.com/jandelgado/gcov2lcov@$(GCOV2LCOV_VERSION)
test -s $(LOCALBIN)/gcov2lcov || GOBIN=$(LOCALBIN) go install github.com/jandelgado/gcov2lcov@$(GCOV2LCOV_VERSION)

.PHONY: addlicense
addlicense: $(ADDLICENSE) ## Download addlicense locally if necessary.
$(ADDLICENSE): $(LOCALBIN)
test -s $(LOCALBIN)/addlicense || GOBIN=$(LOCALBIN) go install github.com/google/addlicense@latest

0 comments on commit 46bd8f2

Please sign in to comment.