Created
August 7, 2013 01:36
-
-
Save shawnbot/6170473 to your computer and use it in GitHub Desktop.
Read environment variables from your .env in make tasks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
source .env && echo "my secret key is: $$SECRET_KEY" |
e
include .env
export
This one works
`include .env
export
local-run:
@echo "Run local run tests with slaves:" ${NUMBER_OF_SLAVES}
./scripts/local-run.sh`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This has the downside that if your values contain special Make characters such as
#
,$
, etc... you will need to escape them in your.env
file. While this might not be a big deal in some cases, it will be if the same.env
file is used by other tools that are not expecting the values to be escaped.