From 37bb6e9c128d4d44fdc52d5a90f5603a5114ce4f Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Wed, 5 Jun 2024 09:43:19 +0200 Subject: [PATCH 1/2] fix mandatory handling --- Makefile | 2 ++ apt.mk | 2 +- compose.mk | 4 +++- simple.mk | 3 +-- tf.mk | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 751fbf6..92622d0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ DEPLOY_START_DELAY = 0 +MANDATORY = DEPLOY_NAME DEPLOY_HOSTS DEPLOY_PATH SSH_USER + -include secrets.mk include config.mk -include $(DEPLOY_CONFIG_OVERRIDE) diff --git a/apt.mk b/apt.mk index b3099ea..bf30b81 100644 --- a/apt.mk +++ b/apt.mk @@ -1,4 +1,4 @@ -MANDATORY-apt = DEPLOY_HOSTS SSH_USER APT_PACKAGES DEPLOY_NAME +MANDATORY = $(MANDATORY) APT_PACKAGES pull-apt: # nop diff --git a/compose.mk b/compose.mk index 6de67f8..fc68b97 100644 --- a/compose.mk +++ b/compose.mk @@ -1,4 +1,6 @@ -MANDATORY-compose = DEPLOY_HOSTS DEPLOY_TYPE SSH_USER DEPLOY_NAME +ifdef DOCKER_LOGIN +MANDATORY = $(MANDATORY) DOCKER_USER DOCKER_PASS DOCKER_REGISTRY +endif ifndef DOCKER_LOGIN DOCKER_LOGIN = 0 diff --git a/simple.mk b/simple.mk index b95bf0f..40ef637 100644 --- a/simple.mk +++ b/simple.mk @@ -1,5 +1,4 @@ -MANDATORY-copy = DEPLOY_TYPE DEPLOY_HOSTS SSH_USER DEPLOY_PATH DEPLOY_NAME -MANDATORY-simple = $(MANDATORY-copy) +#MANDATORY = $(MANDATORY) DEPLOY_PATH # copy # diff --git a/tf.mk b/tf.mk index b06e579..01816f7 100644 --- a/tf.mk +++ b/tf.mk @@ -1,4 +1,5 @@ -MANDATORY-tf = +MANDATORY = $(MANDATORY) TF_FLAGS + # tf # # deploys via tf apply From e5f6c11ea9ccb0f7c6d79ba028ad26efad16c01f Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Wed, 5 Jun 2024 09:45:48 +0200 Subject: [PATCH 2/2] fix the fix --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 92622d0..ae5d17b 100644 --- a/Makefile +++ b/Makefile @@ -22,9 +22,6 @@ deploy: mandatory cleanup prepare build test upload pre-deploy pre-local pull st mandatory: @- echo "\n### mandatory check" -ifndef MANDATORY-$(DEPLOY_TYPE) - $(error MANDATORY-$(DEPLOY_TYPE) is not defined) -endif @ $(foreach var,$(MANDATORY), \ if test -z "${$(var)}"; then \ echo "Missing mandatory variable: $(var)"; \