make localeapp updates work in production environment too
This commit is contained in:
parent
2f31d1a5f8
commit
18f067ea60
1 changed files with 8 additions and 3 deletions
|
@ -81,9 +81,8 @@ else
|
||||||
Foodsoft::Application.config.secret_token = '`openssl rand -hex 128`'
|
Foodsoft::Application.config.secret_token = '`openssl rand -hex 128`'
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
# special environment hooks
|
# configure localeapp, manually to include environment
|
||||||
if [ "$LOCALEAPP_KEY" ]; then
|
if [ "$LOCALEAPP_KEY" ]; then
|
||||||
# configure localeapp, manually to include environment
|
|
||||||
cat >config/initializers/localeapp.rb <<EOF
|
cat >config/initializers/localeapp.rb <<EOF
|
||||||
require 'localeapp/rails'
|
require 'localeapp/rails'
|
||||||
|
|
||||||
|
@ -93,7 +92,8 @@ Localeapp.configure do |config|
|
||||||
config.polling_environments = ['$RAILS_ENV']
|
config.polling_environments = ['$RAILS_ENV']
|
||||||
end
|
end
|
||||||
EOF
|
EOF
|
||||||
bundle exec localeapp pull
|
# also do not cache so we get locale updates
|
||||||
|
sed -i 's|config\.cache_classes\s*=.*|config.cache_classes = false|' config/environments/${RAILS_ENV}.rb
|
||||||
fi
|
fi
|
||||||
# TODO add more extensive database seed
|
# TODO add more extensive database seed
|
||||||
|
|
||||||
|
@ -107,6 +107,11 @@ if !heroku run rake db:version >/dev/null 2>&1; then
|
||||||
else
|
else
|
||||||
heroku run rake db:migrate
|
heroku run rake db:migrate
|
||||||
fi
|
fi
|
||||||
|
# get full translations so update works
|
||||||
|
[ "$LOCALEAPP_KEY" ] && heroku run localeapp pull
|
||||||
|
|
||||||
|
# restart just to be sure
|
||||||
|
heroku ps:restart
|
||||||
|
|
||||||
# return to original branch
|
# return to original branch
|
||||||
git checkout -q "$ORIG_BRANCH" && git stash pop -q
|
git checkout -q "$ORIG_BRANCH" && git stash pop -q
|
||||||
|
|
Loading…
Reference in a new issue