2011-06-30 04:45:12 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# This is an example script for updating Phabricator, similar to the one used to
|
|
|
|
# update <https://secure.phabricator.com/>. It might not work perfectly on your
|
2013-02-14 16:22:43 +01:00
|
|
|
# system, but hopefully it should be easy to adapt. This script is not intended
|
|
|
|
# to work without modifications.
|
2011-06-30 04:45:12 +02:00
|
|
|
|
|
|
|
# NOTE: This script assumes you are running it from a directory which contains
|
2013-02-14 16:22:43 +01:00
|
|
|
# arcanist/, libphutil/, and phabricator/.
|
2011-06-30 04:45:12 +02:00
|
|
|
|
|
|
|
ROOT=`pwd` # You can hard-code the path here instead.
|
|
|
|
|
|
|
|
### UPDATE WORKING COPIES ######################################################
|
|
|
|
|
2012-01-16 20:35:22 +01:00
|
|
|
cd $ROOT/libphutil
|
|
|
|
git pull
|
2011-06-30 04:45:12 +02:00
|
|
|
|
2012-01-16 20:35:22 +01:00
|
|
|
cd $ROOT/arcanist
|
|
|
|
git pull
|
2011-10-20 03:26:21 +02:00
|
|
|
|
2012-01-16 20:35:22 +01:00
|
|
|
cd $ROOT/phabricator
|
|
|
|
git pull
|
2011-10-20 03:26:21 +02:00
|
|
|
|
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
### CYCLE WEB SERVER AND DAEMONS ###############################################
|
2011-06-30 04:45:12 +02:00
|
|
|
|
2012-01-16 20:35:22 +01:00
|
|
|
# Stop daemons.
|
|
|
|
$ROOT/phabricator/bin/phd stop
|
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
# 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.
|
2011-06-30 04:45:12 +02:00
|
|
|
sudo /etc/init.d/httpd stop
|
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
# Upgrade the database schema. You may want to add the "--force" flag to allow
|
|
|
|
# this script to run noninteractively.
|
|
|
|
$ROOT/phabricator/bin/storage upgrade
|
2011-06-30 04:45:12 +02:00
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
# Restart the webserver. As above, this depends on your system and webserver.
|
2011-06-30 04:45:12 +02:00
|
|
|
sudo /etc/init.d/httpd start
|
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
# Restart daemons.
|
2012-05-09 19:29:37 +02:00
|
|
|
$ROOT/phabricator/bin/phd start
|