Skip to content

Commit 97ec61b

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
Makefile: install gitlint if it is not available
Install gitlint into the "GOBIN_ALT" dir if gitlint is not present. Signed-off-by: John Mulligan <[email protected]>
1 parent db8205f commit 97ec61b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,12 @@ endif
313313

314314
gitlint:
315315
ifeq (, $(shell command -v gitlint ;))
316-
$(error "gitlint not found in PATH")
316+
@echo "gitlint not found in PATH, checking $(GOBIN_ALT)"
317+
ifeq (, $(shell command -v $(GOBIN_ALT)/gitlint ;))
318+
@$(call installtool, --gitlint)
319+
@echo "gitlint installed in $(GOBIN_ALT)"
320+
endif
321+
GITLINT=$(GOBIN_ALT)/gitlint
317322
else
318323
GITLINT=$(shell command -v gitlint ;)
319324
endif

0 commit comments

Comments
 (0)