From ce8132e3ea52e1b03b480cc1e674d4cc47886379 Mon Sep 17 00:00:00 2001 From: Alejandro Visiedo Date: Wed, 20 Sep 2023 22:06:23 +0200 Subject: [PATCH 1/2] feat: add printenvcfg rule This new rule will help to know the configuration environment variables that are exported for the commands executed by the makefile. Signed-off-by: Alejandro Visiedo --- scripts/mk/printvars.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/mk/printvars.mk b/scripts/mk/printvars.mk index 83d0ae6d..5e2d94e1 100644 --- a/scripts/mk/printvars.mk +++ b/scripts/mk/printvars.mk @@ -6,3 +6,7 @@ .PHONY: printvars printvars: ## Print variable name and values @true $(foreach V, $(sort $(.VARIABLES)),$(if $(filter-out environment% default automatic,$(origin $V)),$(info $V=$(value $V)))) + +.PHONY: printenvcfg +printenvcfg: ## Print the environment the resulting exported environment + @env | grep -e ^DATABASE_ -e ^KAFKA_ -e ^APP_ -e ^WEB_ -e ^LOGGING_ -e ^CONFIG_PATH= | sort From 59a433a777db4af39c3f5e72a5957e4e9160e3b7 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Thu, 21 Sep 2023 09:08:23 +0200 Subject: [PATCH 2/2] fix: Update scripts/mk/printvars.mk grep Co-authored-by: Christian Heimes --- scripts/mk/printvars.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mk/printvars.mk b/scripts/mk/printvars.mk index 5e2d94e1..520e23b0 100644 --- a/scripts/mk/printvars.mk +++ b/scripts/mk/printvars.mk @@ -9,4 +9,4 @@ printvars: ## Print variable name and values .PHONY: printenvcfg printenvcfg: ## Print the environment the resulting exported environment - @env | grep -e ^DATABASE_ -e ^KAFKA_ -e ^APP_ -e ^WEB_ -e ^LOGGING_ -e ^CONFIG_PATH= | sort + @env | grep -P -e '^(APP|CONFIG_PATH|DATABASE|KAFKA|LOGGING|WEB)(_.*)?=' | sort