Created
April 15, 2024 12:10
-
-
Save lucasassisrosa/fd76b357ff114207555a1505a5934a8b to your computer and use it in GitHub Desktop.
Read environment variables from .env file and export
This file contains hidden or 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
if [ -f .env ]; then | |
export $(cat .env | xargs) | |
export CMS_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
echo "✅ Loaded envs" | |
else | |
echo ".env file Not Found" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment