Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

60 lines (50 sloc) 1.611 kb
# Update script for staging server. Takes care of updating code repo, vendor
# dir, and running DB migrations.
HERE=`dirname $0`
GIT=`which git`
SVN=`which svn`
PYTHON=`which python2.6`
pushd "$HERE/../" > /dev/null
# update locales
pushd locale > /dev/null
$SVN cleanup
$SVN revert -R .
$SVN up
./ .
popd > /dev/null
# pull actual code
$GIT pull -q origin master
$GIT submodule update --init
# pull vendor repo
pushd vendor > /dev/null
$GIT fetch origin
NEWCODE=$($GIT log origin/master..master|wc -l)
$GIT pull -q origin master
$GIT submodule sync
$GIT submodule update --init --recursive
popd > /dev/null
#if [ "$NEWCODE" -gt 0 ]
# Restart celery
supervisorctl restart celery-input-stage
# Run database migrations.
$PYTHON vendor/src/schematic/schematic migrations/
$PYTHON vendor/src/schematic/schematic migrations/sites
# Pull in highcharts.src.js - our lawyers make us do this.
$PYTHON cron get_highcharts
# Minify assets.
$PYTHON compress_assets
#mkdir -p $INPUT_DIR/static
if [ ! -d $INPUT_DIR/static ]; then
echo "making static dir"
mkdir -p $INPUT_DIR/static
$PYTHON collectstatic --noinput --clear
# Grab up to date product details
$PYTHON update_product_details
# Fix mobile and desktop site domains in database. Bug 608581.
$PYTHON ./ cron set_domains
popd > /dev/null
Jump to Line
Something went wrong with that request. Please try again.