kcmerrill / alfred

(v0.2) Even Batman needs a little help. Task runner. Automator. Build system.
MIT License
63 stars 14 forks source link

Add ability to control name of config file via environment variable #88

Closed iilyak closed 5 years ago

iilyak commented 5 years ago

Use case

For development in docker there might be a need to have different set of tasks. One set of tasks to run on a host system and another one inside docker container.

Proposal

Implement support for ALFRED_FILE_NAME variable to override hardcoded alfred.yml. In this case the one would be able to define Docker environment variable ENV ALFRED_FILE_NAME alfred.docker.yml.

kcmerrill commented 5 years ago

This is an interesting feature. Not sure when I can get to it.

Having said that, I use arguments in combination with ok, fail and golang templating to solve all the issues and none of mine have been too hairy.

kcmerrill commented 5 years ago

This ended up being trivial. You can use the -f flag(I documented it in the readme). By default, I'm looking for alfred/alfred.yml or some variation of alfred.

You can use the -f flag now. So if you did alfred -f bleh task.to.run we'd look for bleh.yml or bleh/*.bleh.yml

iilyak commented 5 years ago

Thank you.