From 6e89a7e1723904d520beba56bceb565e5129f65b Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Mon, 16 Jul 2012 11:20:11 +0100 Subject: Run optional "post_install" script --- script/rails-post-deploy | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'script/rails-post-deploy') diff --git a/script/rails-post-deploy b/script/rails-post-deploy index 193d0bbec..6100bb1d0 100755 --- a/script/rails-post-deploy +++ b/script/rails-post-deploy @@ -96,6 +96,12 @@ if [ -n "$OPTION_THEME_URL" ] then echo "Installing $OPTION_THEME_URL using deprecated THEME_URL..." script/plugin install --force $OPTION_THEME_URL + NAME=`sed -re 's/.*\/(.*)\.git.?/\1/'` + POST_INSTALL="vendor/plugins/$NAME/post_install.rb" + if [ -e $POST_INSTALL ] + then + script/runner $POST_INSTALL + fi fi # upgrade database -- cgit v1.2.3 From 27bf048f6681deb4f09090907c6880ff2c5eadb1 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Tue, 17 Jul 2012 12:11:52 +0100 Subject: Make the post-deploy script actually work, and for both incantations of theme installation --- script/rails-post-deploy | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'script/rails-post-deploy') diff --git a/script/rails-post-deploy b/script/rails-post-deploy index 6100bb1d0..dd2e61877 100755 --- a/script/rails-post-deploy +++ b/script/rails-post-deploy @@ -82,12 +82,23 @@ fi bundle install $bundle_install_options +function run_post_install { + NAME=`echo $1 | sed -re 's/.*\/(.*)\.git.?/\1/'` + POST_INSTALL="vendor/plugins/$NAME/post_install.rb" + if [ -e $POST_INSTALL ] + then + echo "running post install script at $POST_INSTALL..." + script/runner $POST_INSTALL + fi +} + if [ -n "$OPTION_THEME_URLS" ] then for THEME in "${OPTION_THEME_URLS[@]}" do echo "Installing $THEME..." script/plugin install --force $THEME + run_post_install $THEME done fi @@ -96,12 +107,7 @@ if [ -n "$OPTION_THEME_URL" ] then echo "Installing $OPTION_THEME_URL using deprecated THEME_URL..." script/plugin install --force $OPTION_THEME_URL - NAME=`sed -re 's/.*\/(.*)\.git.?/\1/'` - POST_INSTALL="vendor/plugins/$NAME/post_install.rb" - if [ -e $POST_INSTALL ] - then - script/runner $POST_INSTALL - fi + run_post_install $OPTION_THEME_URL fi # upgrade database -- cgit v1.2.3 From fdc6d51a298626de0aa3ddfc1e3ca27a55049130 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Wed, 29 Aug 2012 15:29:11 +0100 Subject: Move the installation of themes to a Rake task so that we can use the ALAVETELI_VERSION constant to check for tags in themes that indicate compatibility with this version of the Alaveteli codebase. --- script/rails-post-deploy | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'script/rails-post-deploy') diff --git a/script/rails-post-deploy b/script/rails-post-deploy index dd2e61877..977805eb5 100755 --- a/script/rails-post-deploy +++ b/script/rails-post-deploy @@ -82,33 +82,7 @@ fi bundle install $bundle_install_options -function run_post_install { - NAME=`echo $1 | sed -re 's/.*\/(.*)\.git.?/\1/'` - POST_INSTALL="vendor/plugins/$NAME/post_install.rb" - if [ -e $POST_INSTALL ] - then - echo "running post install script at $POST_INSTALL..." - script/runner $POST_INSTALL - fi -} - -if [ -n "$OPTION_THEME_URLS" ] -then - for THEME in "${OPTION_THEME_URLS[@]}" - do - echo "Installing $THEME..." - script/plugin install --force $THEME - run_post_install $THEME - done -fi - -# Old version of the above, for backwards compatibility -if [ -n "$OPTION_THEME_URL" ] -then - echo "Installing $OPTION_THEME_URL using deprecated THEME_URL..." - script/plugin install --force $OPTION_THEME_URL - run_post_install $OPTION_THEME_URL -fi +bundle exec rake themes:install # upgrade database bundle exec rake db:migrate #--trace -- cgit v1.2.3