From a016f0d7dca6974703d03b77ee7f827303dd3002 Mon Sep 17 00:00:00 2001 From: wvengen Date: Sat, 11 Apr 2015 02:56:39 +0200 Subject: [PATCH] Small improvement to heroku deploy script --- script/heroku_deploy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/heroku_deploy b/script/heroku_deploy index e18bfcf6..b9877467 100755 --- a/script/heroku_deploy +++ b/script/heroku_deploy @@ -38,8 +38,8 @@ if ! heroku apps | grep -q "^$APP\s"; then heroku create "$APP" --region "$REGION" heroku addons:add heroku-postgresql:dev --app "$APP" heroku pg:promote `heroku config | grep 'HEROKU_POSTGRESQL_.*_URL' | cut -d: -f1` + heroku config:set RACK_ENV="${RAILS_ENV}" RAILS_ENV="${RAILS_ENV}" --app "$APP" fi -heroku config:set RACK_ENV="${RAILS_ENV}" RAILS_ENV="${RAILS_ENV}" --app "$APP" # create temporary branch with heroku-specific changes touch ._tmp_havestash @@ -77,7 +77,7 @@ if [ ! -e config/app_config.yml ]; then cp config/app_config.yml.SAMPLE config/app_config.yml fi # keep secret token from currently deployed app, else generate new one -heroku git:remote --app="$APP" >/dev/null 2>&1 +git remote | grep -q heroku || heroku git:remote --app="$APP" >/dev/null 2>&1 if git show heroku/master:config/initializers/secret_token.rb >/dev/null 2>&1; then git show heroku/master:config/initializers/secret_token.rb >config/initializers/secret_token.rb else