2015-10-15 01:47:42 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2016-01-19 20:44:21 +01:00
|
|
|
# Uninstall the unnecessary extra versions of postgres that Travis CI
|
|
|
|
# installs since if we don't do this, doing apt upgrades can fail due
|
|
|
|
# to conflicts over which version of postgres should be running.
|
2016-06-22 17:57:06 +02:00
|
|
|
sudo apt-get remove postgresql-9.1 postgresql-client-9.1 postgresql-9.1-postgis-2.2 postgresql-contrib-9.1 postgresql-9.2 postgresql-client-9.2 postgresql-9.2-postgis-2.2 postgresql-contrib-9.2 postgresql-9.4 -y
|
2016-01-19 20:44:21 +01:00
|
|
|
|
2016-06-27 23:50:38 +02:00
|
|
|
python tools/provision.py --travis --production-travis
|
2016-05-08 03:19:48 +02:00
|
|
|
cp -a tools/travis/success-http-headers.txt ~/
|
2015-10-15 01:47:42 +02:00
|
|
|
source /srv/zulip-venv/bin/activate
|
|
|
|
./tools/build-release-tarball travis
|
|
|
|
mv /tmp/tmp.*/zulip-server-travis.tar.gz ./
|
|
|
|
|
|
|
|
# Shut down all services so that restarting postgres and rebuilding
|
|
|
|
# the postgres database to match the prod installation setup will work.
|
|
|
|
sudo supervisorctl stop all
|
|
|
|
# Clear memcached to avoid contamination between development and prod
|
|
|
|
# environments.
|
|
|
|
sudo /etc/init.d/memcached restart
|
|
|
|
|
|
|
|
# Drop any open connections to the development postgres installation.
|
|
|
|
sudo "$(dirname "$0")/../../scripts/setup/terminate-psql-sessions" postgres zulip zulip_base
|
|
|
|
|
|
|
|
# Remove and recreate the postgres database
|
|
|
|
sudo pg_ctlcluster 9.3 main stop
|
|
|
|
sudo pg_dropcluster 9.3 main
|
|
|
|
sudo rm -rf /etc/postgresql/9.3/main /var/lib/postgresql/9.3/main
|
|
|
|
sudo pg_createcluster 9.3 main
|