-
-
Save martenc/855d4d1399753f3734bbbcdcd7526c6f to your computer and use it in GitHub Desktop.
Script to copy environment variables from an existing heroku app to another one
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
#!/bin/bash | |
# Source: http://blog.nonuby.com/blog/2012/07/05/copying-env-vars-from-one-heroku-app-to-another/ | |
set -e | |
sourceApp="$1" | |
targetApp="$2" | |
config="" | |
while read line; do | |
config="$config $line" | |
done < <(heroku config --app "$sourceApp" --shell ) | |
eval "heroku config:set $config --app $targetApp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment