Files
dockerfiles/Makefile
Uwe Hermann f4b10273dd
All checks were successful
checks / check and test (push) Successful in 32s
checks / check and test (pull_request) Successful in 32s
* MOD: again
Signed-off-by: Uwe Hermann <uh@uleenucks.de>
2024-01-20 12:33:17 +01:00

27 lines
858 B
Makefile

.PHONY: build
build: ## Builds all the dockerfiles in the repository.
@$(CURDIR)/build-all.sh
.PHONY: test
test: shellcheck ## Runs the tests on the repository.
# if this session isn't interactive, then we don't want to allocate a
# TTY, which would fail, but if it is interactive, we do want to attach
# so that the user can send e.g. ^C through.
INTERACTIVE := $(shell [ -t 0 ] && echo 1 || echo 0)
ifeq ($(INTERACTIVE), 1)
DOCKER_FLAGS += -t
endif
.PHONY: shellcheck
shellcheck: ## Runs the shellcheck tests on the scripts.
docker run --rm -i $(DOCKER_FLAGS) \
--name df-shellcheck \
-v $(CURDIR):/usr/src:ro \
--workdir /usr/src \
uleenucks/shellcheck find / -iname '*powershell*'
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'