Skip to content

Commit ee5a2ad

Browse files
committed
Add skeleton makefile that will invoke test script
Signed-off-by: Elijah Zupancic <[email protected]>
1 parent 08814b9 commit ee5a2ad

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

GNUmakefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
MAKE_MAJOR_VER := $(shell echo $(MAKE_VERSION) | cut -d'.' -f1)
2+
3+
ifneq ($(shell test $(MAKE_MAJOR_VER) -gt 3; echo $$?),0)
4+
$(error Make version $(MAKE_VERSION) is not supported, please install GNU Make 4.x)
5+
endif
6+
7+
AWK ?= $(shell command -v gawk 2> /dev/null || command -v awk 2> /dev/null)
8+
9+
Q = $(if $(filter 1,$V),,@)
10+
M = $(shell printf "\033[34;1m▶\033[0m")
11+
12+
# Use docker based commitsar if it isn't in the path
13+
ifeq ($(COMMITSAR),)
14+
COMMITSAR = $(COMMITSAR_DOCKER)
15+
endif
16+
17+
.PHONY: help
18+
help:
19+
@grep --no-filename -E '^[ a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
20+
$(AWK) 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-28s\033[0m %s\n", $$1, $$2}' | sort
21+
22+
.PHONY: test
23+
test: ## Run all tests
24+
$Q $(CURDIR)/test.sh --type oss --unprivileged false --latest-njs false

0 commit comments

Comments
 (0)