Skip to content

Instantly share code, notes, and snippets.

@lucasassisrosa
Created April 15, 2024 12:10
Show Gist options
  • Save lucasassisrosa/fd76b357ff114207555a1505a5934a8b to your computer and use it in GitHub Desktop.
Save lucasassisrosa/fd76b357ff114207555a1505a5934a8b to your computer and use it in GitHub Desktop.
Read environment variables from .env file and export
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