Created
February 4, 2021 07:07
-
-
Save vietanhduong/6eea9c7e297d684b376ff3de400a12fd to your computer and use it in GitHub Desktop.
How to export .env file in Makefile
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
### `.env` | |
### TEST=ABC | |
### | |
test: | |
$(eval include .env) | |
$(eval export $(grep -v '^#' .env | xargs -0)) | |
printenv TEST | |
### make test | |
### printenv TEST | |
### ABC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment