From 97ec61b4255e54f08440ee71a144f9b7b4427052 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Fri, 7 Apr 2023 13:50:23 -0400 Subject: [PATCH] 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 --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 36958fcc..b157b1f9 100644 --- a/Makefile +++ b/Makefile @@ -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