Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

No branches or pull requests

1 participant