Skip to content

Commit

Permalink
Makefile: install gitlint if it is not available
Browse files Browse the repository at this point in the history
Install gitlint into the "GOBIN_ALT" dir if gitlint is not present.

Signed-off-by: John Mulligan <[email protected]>
  • Loading branch information
phlogistonjohn authored and mergify[bot] committed Apr 17, 2023
1 parent db8205f commit 97ec61b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,12 @@ endif

gitlint:
ifeq (, $(shell command -v gitlint ;))
$(error "gitlint not found in PATH")
@echo "gitlint not found in PATH, checking $(GOBIN_ALT)"
ifeq (, $(shell command -v $(GOBIN_ALT)/gitlint ;))
@$(call installtool, --gitlint)
@echo "gitlint installed in $(GOBIN_ALT)"
endif
GITLINT=$(GOBIN_ALT)/gitlint
else
GITLINT=$(shell command -v gitlint ;)
endif

0 comments on commit 97ec61b

Please sign in to comment.