From 6a3eb19876213c70689ff498e88d502c4db42015 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 29 Jun 2011 19:45:12 -0700 Subject: [PATCH] Provide a basic update script for Phabricator Summary: This isn't completely cross-system compatible but it's definitely better than nothing. Test Plan: Pushed secure.phabricator.com a bunch of times. Reviewed By: moskov Reviewers: moskov CC: aran, moskov Differential Revision: 558 --- scripts/install/update_phabricator.sh | 62 +++++++++++++++++++++++++++ src/docs/installation_guide.diviner | 7 +++ 2 files changed, 69 insertions(+) create mode 100755 scripts/install/update_phabricator.sh diff --git a/scripts/install/update_phabricator.sh b/scripts/install/update_phabricator.sh new file mode 100755 index 0000000000..207650d108 --- /dev/null +++ b/scripts/install/update_phabricator.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +set -e +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. + +# NOTE: This script assumes you are running it from a directory which contains +# arcanist/, libphutil/, phabricator/, and possibly diviner/. + +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) +(cd $ROOT/arcanist && git pull) +(cd $ROOT/phabricator && git pull && git submodule update --init) + + +### 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 + +### CYCLE APACHE AND DAEMONS ################################################### + +# Stop Apache. Depening on what system you're running, you may need to use +# 'apachectl' or something else to cycle apache. +sudo /etc/init.d/httpd stop + +# Stop daemons. +$ROOT/phabricator/bin/phd stop + +# Upgrade the database schema. +$ROOT/phabricator/scripts/sql/upgrade_schema.php -f + +# Restart apache. +sudo /etc/init.d/httpd start + +# Restart daemons. Customize this to start whatever daemons you're running on +# your system. + +# $ROOT/phabricator/bin/phd repository-launch-master +# $ROOT/phabricator/bin/phd launch metamta +# $ROOT/phabricator/bin/phd launch 4 taskmaster +# $ROOT/phabricator/bin/phd launch ircbot /config/bot.json diff --git a/src/docs/installation_guide.diviner b/src/docs/installation_guide.diviner index a10ebe062b..449ea71bd2 100644 --- a/src/docs/installation_guide.diviner +++ b/src/docs/installation_guide.diviner @@ -102,6 +102,13 @@ You can find installation instructions for xhprof here: You only need to install the PHP extension, not any of the library. += Updating Phabricator = + +Since Phabricator is under active development, you should update frequently. +You can use a script similar to this one to automate the process: + + http://phabricator.com/rsrc/install/update_phabricator.sh + = Next Steps = Continue by: