This repository has been archived by the owner on Jan 31, 2019. It is now read-only.
forked from fwenzel/reporter
/
update_prod.sh
60 lines (45 loc) · 1.72 KB
/
update_prod.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
set -e
SVN="/usr/bin/svn"
INPUT_DIR="/data/input/python/input.mozilla.com/reporter"
VENDOR_DIR="$INPUT_DIR/vendor"
SYNC_DIR="/data/input/www/django/input.mozilla.com/reporter/"
# update locales
pushd locale > /dev/null
$SVN revert -R .
$SVN up
./compile-mo.sh .
popd > /dev/null
echo -e "Updating vendor..."
cd $VENDOR_DIR
git pull
git submodule sync
git submodule update --init --recursive
echo -e "Updating reporter..."
cd $INPUT_DIR
git fetch origin
# Note: We're deploying from the master branch now to shave off some
# workflow steps because this is a dead project. (willkg)
git checkout origin/master
git submodule update --init
cd /data/input;
/usr/bin/rsync -aq --exclude '.git*' --delete /data/input/python/ /data/input/www/django
cd $SYNC_DIR
# FIXME: Commenting this out because it's not working.
# /usr/bin/python26 $VENDOR_DIR/src/schematic/schematic migrations
# Pull in highcharts.src.js - our lawyers make us do this.
/usr/bin/python26 $INPUT_DIR/manage.py cron get_highcharts
/usr/bin/python26 $INPUT_DIR/manage.py compress_assets
mkdir -p $INPUT_DIR/static
/usr/bin/python26 $INPUT_DIR/manage.py collectstatic --noinput --clear
# FIXME: Commenting this out because it's not working.
# if [ -d $SYNC_DIR/migrations/sites ]; then
# /usr/bin/python26 $VENDOR_DIR/src/schematic/schematic migrations/sites
# fi
# Clustering commented out because it takes too long during release.
# If urgent, start by hand (in a screen). If not urgent, wait until clustering
# cron job reoccurs.
#su - apache -s /bin/sh -c '/usr/bin/python26 /data/input/www/django/input.mozilla.com/reporter/manage.py cron cluster'
/data/input/deploy
#/data/bin/omg_push_generic_live.sh .
#/data/bin/issue-multi-command.py generic 'service httpd reload'