From 7a2826392f273bff971dccbe9bf4d84a7418e0f1 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 14 Feb 2013 07:22:43 -0800 Subject: [PATCH] Simplify the "update_phabricator.sh" script Summary: Pare this down to the bare bones. Diviner is going away soon anyway. Test Plan: Read instructions. Reviewers: edward Reviewed By: edward CC: aran Differential Revision: https://secure.phabricator.com/D4951 --- scripts/install/update_phabricator.sh | 52 +++++++-------------------- 1 file changed, 12 insertions(+), 40 deletions(-) diff --git a/scripts/install/update_phabricator.sh b/scripts/install/update_phabricator.sh index e537b0be0c..c89dac967b 100755 --- a/scripts/install/update_phabricator.sh +++ b/scripts/install/update_phabricator.sh @@ -5,21 +5,16 @@ set -x # This is an example script for updating Phabricator, similar to the one used to # update . It might not work perfectly on your -# system, but hopefully it should be easy to adapt. +# system, but hopefully it should be easy to adapt. This script is not intended +# to work without modifications. # NOTE: This script assumes you are running it from a directory which contains -# arcanist/, libphutil/, phabricator/, and possibly diviner/. +# arcanist/, libphutil/, and phabricator/. ROOT=`pwd` # You can hard-code the path here instead. ### UPDATE WORKING COPIES ###################################################### -if [ -e $ROOT/diviner ] -then - cd $ROOT/diviner - git pull -fi - cd $ROOT/libphutil git pull @@ -30,45 +25,22 @@ cd $ROOT/phabricator git pull -### RUN TESTS ################################################################## - -# This is an acceptance test that makes sure all symbols can be loaded to -# avoid issues like missing methods in descendants of abstract base classes. -cd $ROOT/phabricator -../arcanist/bin/arc unit src/infrastructure/__tests__/ - - -### CYCLE APACHE AND DAEMONS ################################################### +### CYCLE WEB SERVER AND DAEMONS ############################################### # Stop daemons. $ROOT/phabricator/bin/phd stop -# Stop Apache. Depening on what system you're running, you may need to use -# 'apachectl' or something else to cycle apache. +# Stop the webserver (apache, nginx, lighttpd, etc). This command will differ +# depending on which system and webserver you are running: replace it with an +# appropriate command for your system. sudo /etc/init.d/httpd stop -# Upgrade the database schema. -$ROOT/phabricator/bin/storage upgrade --force +# Upgrade the database schema. You may want to add the "--force" flag to allow +# this script to run noninteractively. +$ROOT/phabricator/bin/storage upgrade -# Restart apache. +# Restart the webserver. As above, this depends on your system and webserver. sudo /etc/init.d/httpd start -# Restart daemons. Customize this to start whatever daemons you're running on -# your system. - +# Restart daemons. $ROOT/phabricator/bin/phd start -# $ROOT/phabricator/bin/phd launch ircbot /config/bot.json - - -### GENERATE DOCUMENTATION ##################################################### - -# This generates documentation if you have diviner/ checked out. You generally -# don't need to do this unless you're contributing to Phabricator and want to -# preview some of the amazing documentation you've just written. -if [ -e $ROOT/diviner ] -then - cd $ROOT/diviner && $ROOT/diviner/bin/diviner . - cd $ROOT/libphutil && $ROOT/diviner/bin/diviner . - cd $ROOT/arcanist && $ROOT/diviner/bin/diviner . - cd $ROOT/phabricator && $ROOT/diviner/bin/diviner . -fi