diff options
Diffstat (limited to 'script/rails-post-deploy')
-rwxr-xr-x | script/rails-post-deploy | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/script/rails-post-deploy b/script/rails-post-deploy index d9e9bb3f1..193d0bbec 100755 --- a/script/rails-post-deploy +++ b/script/rails-post-deploy @@ -45,10 +45,10 @@ else mkdir -p log fi # link the "downloads" directory in the cache to somewhere it can be served -if [ ! -e $APP_DIR/public/download ] +if [ ! -e "$APP_DIR/public/download" ] then - mkdir -p $APP_DIR/cache/zips/download - ln -s $APP_DIR/cache/zips/download $APP_DIR/public/ + mkdir -p "$APP_DIR/cache/zips/download" + ln -s "$APP_DIR/cache/zips/download" "$APP_DIR/public/" fi cd log @@ -74,12 +74,31 @@ then echo "ENV['RAILS_ENV'] ||= 'production'" > config/rails_env.rb fi +bundle_install_options="" +if [ "$OPTION_STAGING_SITE" = "0" ] +then + bundle_install_options="--without development:test --deployment" +fi + +bundle install $bundle_install_options + +if [ -n "$OPTION_THEME_URLS" ] +then + for THEME in "${OPTION_THEME_URLS[@]}" + do + echo "Installing $THEME..." + script/plugin install --force $THEME + done +fi + +# Old version of the above, for backwards compatibility if [ -n "$OPTION_THEME_URL" ] then - script/plugin install --force $OPTION_THEME_URL + echo "Installing $OPTION_THEME_URL using deprecated THEME_URL..." + script/plugin install --force $OPTION_THEME_URL fi # upgrade database -rake db:migrate #--trace +bundle exec rake db:migrate #--trace |