Page MenuHomeGitPull.it

Upgrade gitpull to latest Phabricator version
Closed, ResolvedPublic

Description

Upgraded gitpull to latest Phabricator version.

After the upgrade we are at 6d620a8bd18b.

Created a script to update everything:

#!/bin/sh

# die in case of any error
set -e

# print commands and their arguments as they are executed
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. This script is not intended
# to work without modifications.

# NOTE: This script assumes you are running it from a directory which contains
# arcanist/, and phabricator/.

ROOT=/home/www-data/gitpull.it

### STOP WEB SERVER AND DAEMONS ###############################################

# Stop daemons.
systemctl stop phabricator-email-ils phabricator-email phabricator-phd phabricator-ssh

# If running the notification server, stop it.
# $ROOT/phabricator/bin/aphlict stop

# 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.
# NOTE: If you're running php-fpm, you should stop it here too.
a2dissite  gitpull.it
a2ensite   gitpull.it.maintenance
apache2ctl graceful

### UPDATE WORKING COPIES ######################################################

cd $ROOT/arcanist
git pull --rebase

cd $ROOT/phabricator
git pull --rebase

# Upgrade the database schema. You may want to add the "--force" flag to allow
# this script to run noninteractively.
$ROOT/phabricator/bin/storage upgrade

# Restart the webserver. As above, this depends on your system and webserver.
# NOTE: If you're running php-fpm, restart it here too.
a2ensite   gitpull.it
a2dissite  gitpull.it.maintenance
apache2ctl graceful

# Restart daemons.
systemctl start phabricator-email-ils phabricator-email phabricator-phd phabricator-ssh

# If running the notification server, start it.
# $ROOT/phabricator/bin/aphlict start