2022-11-13 01:10:26 +01:00
|
|
|
version: "3"
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
validate:
|
|
|
|
desc: Check .env for missing variables
|
|
|
|
cmds:
|
|
|
|
- |
|
|
|
|
{{with .MISSING_VARS | trim}}
|
|
|
|
echo Warning: missing vars in .env:
|
|
|
|
{{range (. | splitLines)}}
|
|
|
|
echo " {{. | trimSuffix "="}}"
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
vars:
|
|
|
|
MISSING_VARS:
|
2022-11-22 20:46:51 +01:00
|
|
|
sh: tasks/validate.sh
|
2022-11-13 01:10:26 +01:00
|
|
|
|
|
|
|
template:
|
|
|
|
desc: Fill in variables in *.template.* files
|
|
|
|
deps: [validate]
|
|
|
|
cmds:
|
|
|
|
- |
|
2023-10-18 19:54:47 +02:00
|
|
|
find . -name "*.template.*" | while read -r f
|
2022-11-13 01:10:26 +01:00
|
|
|
do
|
|
|
|
echo "templating $f"
|
|
|
|
envsubst < $f > ${f/.template/}
|
|
|
|
done
|
|
|
|
sources:
|
2023-10-18 19:54:47 +02:00
|
|
|
- ./**/*.template.*
|
2022-11-13 01:10:26 +01:00
|
|
|
- .env
|