mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
fix(kb/make): conditionally import a file deending on the target's name
This commit is contained in:
@@ -83,6 +83,14 @@ plan: pre-flight ${tf_vars_file}
|
||||
apply: plan ${tf_plan_file}
|
||||
${info applying ${environment_id}'s plan}
|
||||
@terraform apply '${tf_plan_file}'
|
||||
|
||||
ifeq "test-db-connection" "$(findstring test-db-connection,$(MAKECMDGOALS))"
|
||||
-include db.env db.secret.env
|
||||
endif
|
||||
test-db-connection: override PSQL ?= psql
|
||||
test-db-connection: override PGPASSWORD ?= ${password}
|
||||
test-db-connection: ${shell which 'psql'}
|
||||
@${PSQL} -h '${host}' -p '${port}' -U '${username}' '${database}' -c '\q'
|
||||
```
|
||||
|
||||
## Load .env files in the Makefile
|
||||
|
||||
Reference in New Issue
Block a user