Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Can't define more than one env-variable without indenting #27

Open
mortenlj opened this issue Oct 30, 2019 · 0 comments
Open

Can't define more than one env-variable without indenting #27

mortenlj opened this issue Oct 30, 2019 · 0 comments

Comments

@mortenlj
Copy link
Contributor

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant