Skip to content

Commit 6a3eb19

Browse files
author
epriestley
committedJun 30, 2011
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
1 parent 3c785cd commit 6a3eb19

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed
 

‎scripts/install/update_phabricator.sh

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/sh
2+
3+
set -e
4+
set -x
5+
6+
# This is an example script for updating Phabricator, similar to the one used to
7+
# update <https://secure.phabricator.com/>. It might not work perfectly on your
8+
# system, but hopefully it should be easy to adapt.
9+
10+
# NOTE: This script assumes you are running it from a directory which contains
11+
# arcanist/, libphutil/, phabricator/, and possibly diviner/.
12+
13+
ROOT=`pwd` # You can hard-code the path here instead.
14+
15+
16+
### UPDATE WORKING COPIES ######################################################
17+
18+
if [ -e $ROOT/diviner ]
19+
then
20+
(cd $ROOT/diviner && git pull)
21+
fi
22+
23+
(cd $ROOT/libphutil && git pull)
24+
(cd $ROOT/arcanist && git pull)
25+
(cd $ROOT/phabricator && git pull && git submodule update --init)
26+
27+
28+
### GENERATE DOCUMENTATION #####################################################
29+
30+
# This generates documentation if you have diviner/ checked out. You generally
31+
# don't need to do this unless you're contributing to Phabricator and want to
32+
# preview some of the amazing documentation you've just written.
33+
if [ -e $ROOT/diviner ]
34+
then
35+
(cd $ROOT/diviner && $ROOT/diviner/bin/diviner .)
36+
(cd $ROOT/libphutil && $ROOT/diviner/bin/diviner .)
37+
(cd $ROOT/arcanist && $ROOT/diviner/bin/diviner .)
38+
(cd $ROOT/phabricator && $ROOT/diviner/bin/diviner .)
39+
fi
40+
41+
### CYCLE APACHE AND DAEMONS ###################################################
42+
43+
# Stop Apache. Depening on what system you're running, you may need to use
44+
# 'apachectl' or something else to cycle apache.
45+
sudo /etc/init.d/httpd stop
46+
47+
# Stop daemons.
48+
$ROOT/phabricator/bin/phd stop
49+
50+
# Upgrade the database schema.
51+
$ROOT/phabricator/scripts/sql/upgrade_schema.php -f
52+
53+
# Restart apache.
54+
sudo /etc/init.d/httpd start
55+
56+
# Restart daemons. Customize this to start whatever daemons you're running on
57+
# your system.
58+
59+
# $ROOT/phabricator/bin/phd repository-launch-master
60+
# $ROOT/phabricator/bin/phd launch metamta
61+
# $ROOT/phabricator/bin/phd launch 4 taskmaster
62+
# $ROOT/phabricator/bin/phd launch ircbot /config/bot.json

‎src/docs/installation_guide.diviner

+7
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ You can find installation instructions for xhprof here:
102102

103103
You only need to install the PHP extension, not any of the library.
104104

105+
= Updating Phabricator =
106+
107+
Since Phabricator is under active development, you should update frequently.
108+
You can use a script similar to this one to automate the process:
109+
110+
http://phabricator.com/rsrc/install/update_phabricator.sh
111+
105112
= Next Steps =
106113

107114
Continue by:

0 commit comments

Comments
 (0)
Failed to load comments.