Skip to content

Commit 5fd46dc

Browse files
author
epriestley
committedJan 16, 2012
Improve order of operations in upgrade script
Summary: - Run "phd stop" before stopping apache. This is essentially a smoke test for PHABRICATOR_ENV being set. - Run documentation generation after everything else. Between the pull and the restart we have some minor exposure to APC issues with deleted files and out-of-date module definitions, and this limits that. - Pull commands out of (x && y) stuff, this prevents "set -e" from working correctly. Test Plan: Ran upgrade script locally. Reviewers: btrahan, jungejason Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D1419
1 parent 5333b16 commit 5fd46dc

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed
 

‎scripts/install/update_phabricator.sh

+31-24
Original file line numberDiff line numberDiff line change
@@ -12,49 +12,42 @@ set -x
1212

1313
ROOT=`pwd` # You can hard-code the path here instead.
1414

15-
1615
### UPDATE WORKING COPIES ######################################################
1716

1817
if [ -e $ROOT/diviner ]
1918
then
20-
(cd $ROOT/diviner && git pull)
19+
cd $ROOT/diviner
20+
git pull
2121
fi
2222

23-
(cd $ROOT/libphutil && git pull)
24-
(cd $ROOT/arcanist && git pull)
25-
(cd $ROOT/phabricator && git pull && git submodule update --init)
26-
23+
cd $ROOT/libphutil
24+
git pull
2725

28-
### RUN TESTS ##################################################################
26+
cd $ROOT/arcanist
27+
git pull
2928

30-
# This is an acceptance test that makes sure all symboles can be loaded to
31-
# avoid issues like missing methods in descendants of abstract base class.
32-
(cd $ROOT/phabricator && ../arcanist/bin/arc unit src/infrastructure/__tests__/)
29+
cd $ROOT/phabricator
30+
git pull
31+
git submodule update --init
3332

3433

35-
### GENERATE DOCUMENTATION #####################################################
34+
### RUN TESTS ##################################################################
3635

37-
# This generates documentation if you have diviner/ checked out. You generally
38-
# don't need to do this unless you're contributing to Phabricator and want to
39-
# preview some of the amazing documentation you've just written.
40-
if [ -e $ROOT/diviner ]
41-
then
42-
(cd $ROOT/diviner && $ROOT/diviner/bin/diviner .)
43-
(cd $ROOT/libphutil && $ROOT/diviner/bin/diviner .)
44-
(cd $ROOT/arcanist && $ROOT/diviner/bin/diviner .)
45-
(cd $ROOT/phabricator && $ROOT/diviner/bin/diviner .)
46-
fi
36+
# This is an acceptance test that makes sure all symbols can be loaded to
37+
# avoid issues like missing methods in descendants of abstract base classes.
38+
cd $ROOT/phabricator
39+
../arcanist/bin/arc unit src/infrastructure/__tests__/
4740

4841

4942
### CYCLE APACHE AND DAEMONS ###################################################
5043

44+
# Stop daemons.
45+
$ROOT/phabricator/bin/phd stop
46+
5147
# Stop Apache. Depening on what system you're running, you may need to use
5248
# 'apachectl' or something else to cycle apache.
5349
sudo /etc/init.d/httpd stop
5450

55-
# Stop daemons.
56-
$ROOT/phabricator/bin/phd stop
57-
5851
# Upgrade the database schema.
5952
$ROOT/phabricator/scripts/sql/upgrade_schema.php -f
6053

@@ -69,3 +62,17 @@ sudo /etc/init.d/httpd start
6962
# $ROOT/phabricator/bin/phd launch garbagecollector
7063
# $ROOT/phabricator/bin/phd launch 4 taskmaster
7164
# $ROOT/phabricator/bin/phd launch ircbot /config/bot.json
65+
66+
67+
### GENERATE DOCUMENTATION #####################################################
68+
69+
# This generates documentation if you have diviner/ checked out. You generally
70+
# don't need to do this unless you're contributing to Phabricator and want to
71+
# preview some of the amazing documentation you've just written.
72+
if [ -e $ROOT/diviner ]
73+
then
74+
cd $ROOT/diviner && $ROOT/diviner/bin/diviner .
75+
cd $ROOT/libphutil && $ROOT/diviner/bin/diviner .
76+
cd $ROOT/arcanist && $ROOT/diviner/bin/diviner .
77+
cd $ROOT/phabricator && $ROOT/diviner/bin/diviner .
78+
fi

0 commit comments

Comments
 (0)
Failed to load comments.