From 7645a220d07778f3c3290e6373e645e1667dda7d Mon Sep 17 00:00:00 2001 From: Flo Date: Sat, 30 Mar 2024 17:23:18 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20Makefile=20variable=20defi?= =?UTF-8?q?nition=20that=20should=20be=20evaluated=20immediately?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 02da4b4..64cafb4 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,28 @@ .EXPORT_ALL_VARIABLES: .PHONY: set-up-docker tear-down-docker testacc testacc-with-setup clean-testacc provider clean generate -METABASE_USERNAME?=terraform-provider@tests.com -METABASE_PASSWORD?=$(shell uuidgen) -METABASE_URL?=http://localhost:3000/api - -PG_HOST?=terraform-metabase-pg -PG_USER?=metabase -PG_PASSWORD?=$(shell uuidgen) -PG_DATABASE?=metabase +ifndef METABASE_USERNAME +METABASE_USERNAME:=terraform-provider@tests.com +endif +ifndef METABASE_PASSWORD +METABASE_PASSWORD:=$(shell uuidgen) +endif +ifndef METABASE_URL +METABASE_URL:=http://localhost:3000/api +endif + +ifndef PG_HOST +PG_HOST:=terraform-metabase-pg +endif +ifndef PG_USER +PG_USER:=metabase +endif +ifndef PG_PASSWORD +PG_PASSWORD:=$(shell uuidgen) +endif +ifndef PG_DATABASE +PG_DATABASE:=metabase +endif MBTF_FOLDER:=cmd/mbtf