added `ALWAYS_RUN` target `Makefile` recipies (#3013)

This ensures the recipies are always run.

Co-authored-by: georglauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
Brennan Kinney 2023-01-22 12:15:12 +13:00 committed by GitHub
parent e3c4ef76c6
commit 94a9d2af44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@ BATS_PARALLEL_JOBS ?= 2
all: lint build generate-accounts tests clean all: lint build generate-accounts tests clean
build: build: ALWAYS_RUN
@ DOCKER_BUILDKIT=1 docker build \ @ DOCKER_BUILDKIT=1 docker build \
--tag $(IMAGE_NAME) \ --tag $(IMAGE_NAME) \
--build-arg VCS_VERSION=$(shell git rev-parse --short HEAD) \ --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 # `docker ps`: Remove any lingering test containers
# `.gitignore`: Remove `test/duplicate_configs` and files copied via `make generate-accounts` # `.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 -@ 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 -@ 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 @ shopt -s globstar ; ./test/bats/bin/bats $(BATS_FLAGS) test/$@/*.bats
tests/parallel/set%: ALWAYS_RUN 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 \ --no-parallelize-within-files \
--jobs $(BATS_PARALLEL_JOBS) \ --jobs $(BATS_PARALLEL_JOBS) \
test/$@/**/*.bats test/$@/**/*.bats
@ -59,13 +59,13 @@ test/%: ALWAYS_RUN
# --- Lints ------------------------------------- # --- Lints -------------------------------------
# ----------------------------------------------- # -----------------------------------------------
lint: eclint hadolint shellcheck lint: ALWAYS_RUN eclint hadolint shellcheck
hadolint: hadolint: ALWAYS_RUN
@ ./test/linting/lint.sh hadolint @ ./test/linting/lint.sh hadolint
shellcheck: shellcheck: ALWAYS_RUN
@ ./test/linting/lint.sh shellcheck @ ./test/linting/lint.sh shellcheck
eclint: eclint: ALWAYS_RUN
@ ./test/linting/lint.sh eclint @ ./test/linting/lint.sh eclint