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:
|
|
|
|
- |
|
|
|
|
find -name "*.template.*" | while read -r f
|
|
|
|
do
|
|
|
|
echo "templating $f"
|
|
|
|
envsubst < $f > ${f/.template/}
|
|
|
|
done
|
|
|
|
sources:
|
|
|
|
- ./**/*.template.*
|
|
|
|
- .env
|