diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-03-10 10:14:41 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-03-11 10:52:09 +0000 |
commit | 57005fd0ff6d05167e0cce2795a2c3352497c9ab (patch) | |
tree | c103bec5e46a9002fc83052305edb288c9437320 | |
parent | f4b10a38fdbd10bd4b1821565c222f66670d3fc5 (diff) |
Allow the location of the bundle to be configured
- Sets vendor/bundle as default
- Uses $HOME/bundle when generating general.yml
Based on d9f162c8ab08cb881cd68a3eee900c52c63cb1ae
-rw-r--r-- | config/general.yml-example | 4 | ||||
-rwxr-xr-x | script/install-as-user | 1 | ||||
-rwxr-xr-x | script/rails-deploy-before-down | 11 |
3 files changed, 13 insertions, 3 deletions
diff --git a/config/general.yml-example b/config/general.yml-example index 2b68721a5..ec9bdb6b5 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -215,6 +215,10 @@ USE_MAILCATCHER_IN_DEVELOPMENT: true # config.action_controller.perform_caching is set to true CACHE_FRAGMENTS: true +# The default bundle path is vendor/bundle; you can set this option to +# change it. +BUNDLE_PATH: vendor/bundle + # In some deployments of Alaveteli you may wish to install each newly # deployed version alongside the previous ones, in which case certain # files and resources should be shared between these installations: diff --git a/script/install-as-user b/script/install-as-user index aaad52145..a6c267066 100755 --- a/script/install-as-user +++ b/script/install-as-user @@ -114,6 +114,7 @@ then -e "s,^( *DONATION_URL:).*,\\1 null," \ -e "s,^( *THEME_BRANCH:).*,\\1 'develop'," \ -e "s,^( *USE_MAILCATCHER_IN_DEVELOPMENT:).*,\\1 false," \ + -e "s,^( *BUNDLE_PATH:).*,\\1 $HOME/bundle/," \ config/general.yml-example > config/general.yml fi diff --git a/script/rails-deploy-before-down b/script/rails-deploy-before-down index ad1049e44..c157a8624 100755 --- a/script/rails-deploy-before-down +++ b/script/rails-deploy-before-down @@ -123,19 +123,24 @@ END echo "ENV['RAILS_ENV'] ||= 'production'" > config/rails_env.rb fi -bundle_install_options="" +BUNDLE_PATH="${OPTION_BUNDLE_PATH:-vendor/bundle}" + +bundle_install_options="--path $BUNDLE_PATH" + if [ "$OPTION_STAGING_SITE" = "0" ] then - bundle_install_options="--without development:test --deployment" + bundle_install_options="$bundle_install_options --without development:test --deployment" fi if [ "$OPTION_STAGING_SITE" = "1" ] then - bundle_install_options="--path vendor/bundle" + bundle_install_options="$bundle_install_options" fi if [ "$TRAVIS" = "true" ] then bundle_install_options="--without development develop --deployment" fi + +echo "Running bundle install with options: $bundle_install_options" bundle install $bundle_install_options bundle exec rake submodules:check |