Skip to content

Commit

Permalink
Add skeleton makefile that will invoke test script
Browse files Browse the repository at this point in the history
Signed-off-by: Elijah Zupancic <[email protected]>
  • Loading branch information
dekobon committed Dec 16, 2022
1 parent 08814b9 commit ee5a2ad
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MAKE_MAJOR_VER := $(shell echo $(MAKE_VERSION) | cut -d'.' -f1)

ifneq ($(shell test $(MAKE_MAJOR_VER) -gt 3; echo $$?),0)
$(error Make version $(MAKE_VERSION) is not supported, please install GNU Make 4.x)
endif

AWK ?= $(shell command -v gawk 2> /dev/null || command -v awk 2> /dev/null)

Q = $(if $(filter 1,$V),,@)
M = $(shell printf "\033[34;1m▶\033[0m")

# Use docker based commitsar if it isn't in the path
ifeq ($(COMMITSAR),)
COMMITSAR = $(COMMITSAR_DOCKER)
endif

.PHONY: help
help:
@grep --no-filename -E '^[ a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
$(AWK) 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-28s\033[0m %s\n", $$1, $$2}' | sort

.PHONY: test
test: ## Run all tests
$Q $(CURDIR)/test.sh --type oss --unprivileged false --latest-njs false

0 comments on commit ee5a2ad

Please sign in to comment.