diff --git a/Makefile b/Makefile index 584ee997..5fc222ff 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ BATS_PARALLEL_JOBS ?= 2 all: lint build generate-accounts tests clean -build: +build: ALWAYS_RUN @ DOCKER_BUILDKIT=1 docker build \ --tag $(IMAGE_NAME) \ --build-arg VCS_VERSION=$(shell git rev-parse --short HEAD) \ @@ -30,7 +30,7 @@ generate-accounts: ALWAYS_RUN # `docker ps`: Remove any lingering test containers # `.gitignore`: Remove `test/duplicate_configs` and files copied via `make generate-accounts` -clean: +clean: ALWAYS_RUN -@ for CONTAINER in $$(docker ps -a --filter name='^dms-test_.*|^mail_.*|^hadolint$$|^eclint$$|^shellcheck$$' | sed 1d | cut -f 1-1 -d ' '); do docker rm -f $${CONTAINER}; done -@ while read -r LINE; do [[ $${LINE} =~ test/.+ ]] && sudo rm -rf $${LINE}; done < .gitignore @@ -47,7 +47,7 @@ tests/serial: ALWAYS_RUN @ shopt -s globstar ; ./test/bats/bin/bats $(BATS_FLAGS) test/$@/*.bats tests/parallel/set%: ALWAYS_RUN - @ shopt -s globstar ; ./test/bats/bin/bats $(BATS_FLAGS) \ + @ shopt -s globstar ; $(REPOSITORY_ROOT)/test/bats/bin/bats $(BATS_FLAGS) \ --no-parallelize-within-files \ --jobs $(BATS_PARALLEL_JOBS) \ test/$@/**/*.bats @@ -59,13 +59,13 @@ test/%: ALWAYS_RUN # --- Lints ------------------------------------- # ----------------------------------------------- -lint: eclint hadolint shellcheck +lint: ALWAYS_RUN eclint hadolint shellcheck -hadolint: +hadolint: ALWAYS_RUN @ ./test/linting/lint.sh hadolint -shellcheck: +shellcheck: ALWAYS_RUN @ ./test/linting/lint.sh shellcheck -eclint: +eclint: ALWAYS_RUN @ ./test/linting/lint.sh eclint