From 6ef8d28d963cd166146c1dddab92100af097e2e8 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Thu, 24 Oct 2024 13:24:24 +0000 Subject: [PATCH] feat: ensure bash and safe exec --- podman.mk | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/podman.mk b/podman.mk index 448ee65..fc5b10e 100644 --- a/podman.mk +++ b/podman.mk @@ -1,3 +1,13 @@ +SHELL := bash +.SHELLFLAGS := -eu -o pipefail -c +.DELETE_ON_ERROR: +.SILENT: ; # no need for @ +.ONESHELL: ; # recipes execute in same shell +.NOTPARALLEL: ; # wait for this target to finish +.EXPORT_ALL_VARIABLES: ; # send all vars to shell +.PHONY: all # All targets are accessible for user +.DEFAULT: help # Running Make will run the help target + # Parse version from latest git semver tag GIT_TAG ?= $(shell git describe --tags --match v*.*.* 2>/dev/null || git rev-parse --short HEAD 2>/dev/null) GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) @@ -23,13 +33,6 @@ ifneq ($(TRIVY_REMOTE),) TRIVY_OPTS ::= --server $(TRIVY_REMOTE) endif -.SILENT: ; # no need for @ -.ONESHELL: ; # recipes execute in same shell -.NOTPARALLEL: ; # wait for this target to finish -.EXPORT_ALL_VARIABLES: ; # send all vars to shell -.PHONY: all # All targets are accessible for user -.DEFAULT: help # Running Make will run the help target - help: ## Show Help grep -E '^[a-zA-Z_-]+:.*?## .*$$' .ci/podman.mk | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'