Created
September 11, 2023 07:25
-
-
Save wachukxs/e7ce5a96f708f315e554054e7d9d77ef to your computer and use it in GitHub Desktop.
.sh command to auto export your .env content to Heroku
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
#!/bin/zsh | |
# set -o allexport | |
# source .env | |
# set +o allexport | |
while read line; | |
do | |
if [[ $line == "#"* ]] || [[ $line == "" ]] || [[ $line == ";"* ]] ; | |
then | |
echo "skipping comment or empty line:" $line; | |
else | |
echo "writing" $line; | |
# heroku config:set GITHUB_USERNAME=joesmith | |
heroku config:set $line | |
fi | |
done<.env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment