1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 10:52:41 +01:00
phorge-phorge/scripts/install/update_phabricator.sh
epriestley b800df8c1b Simplify daemon management: "phd start"
Summary:
  - Merge CommitTask daemon into PullLocal daemon. This is another artifact of past instability (and order-dependent parsers). We still publish to the timeline, although this was the last consumer. Long term we'll probably delete timeline and move to webhooks, since everyone who has asked about this stuff has been eager to trade away the durability and ordering of the timeline for the ease of use of webhooks. There's also no reason to timeline this anymore since parsing is no longer order-dependent.
  - Add `phd start` to start all the daemons you need. Add `phd restart` to restart all the daemons you need. So cool~
  - Simplify and improve phd and Diffusion daemon documentation.

Test Plan:
  - Ran `phd start`.
  - Ran `phd restart`.
  - Generated/read documentation.
  - Imported some stuff, got clean parses.

Reviewers: btrahan, csilvers

Reviewed By: csilvers

CC: aran, jungejason, nh

Differential Revision: https://secure.phabricator.com/D2433
2012-05-09 10:29:37 -07:00

75 lines
2.1 KiB
Bash
Executable file

#!/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
# 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
### 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 ###################################################
# 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.
sudo /etc/init.d/httpd stop
# Upgrade the database schema.
$ROOT/phabricator/bin/storage upgrade --force
# 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 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