bake
bake copied to clipboard
Can't define more than one env-variable without indenting
I'm testing bake, and wanted to define two environment variables at the start that would apply to all tasks. Strangely enough, only the first one takes effect, the second one is ignored. If I indent the second one, it is suddenly included. This is very confusing.
With this Bakefile:
VERSION="$(date +%Y%m%d%H%M%S)-$(git rev-parse --short HEAD)"
NAME="example.com/project/fake:${VERSION}"
fake:
echo NAME="${NAME}"
echo VERSION="${VERSION}"
This is the output:
bake fake
+ Executing fake:
| NAME=
| VERSION=20191030205511-faace62
+ Done.
If I change it to this:
VERSION="$(date +%Y%m%d%H%M%S)-$(git rev-parse --short HEAD)"
NAME="example.com/project/fake:${VERSION}"
fake:
echo NAME="${NAME}"
echo VERSION="${VERSION}"
This is the output:
bake fake
+ Executing fake:
| NAME=example.com/project/fake:20191030205539-faace62
| VERSION=20191030205539-faace62
+ Done.