Skip to content

Instantly share code, notes, and snippets.

@treshugart
Created March 26, 2013 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save treshugart/5250124 to your computer and use it in GitHub Desktop.
Save treshugart/5250124 to your computer and use it in GitHub Desktop.
Installing versions of Postgres other than the default version in TravisCI.
#!/bin/sh
TRAVIS_PGVERSION='9.1'
if [ $PGVERSION != $TRAVIS_PGVERSION ]
then
sudo -u postgres pg_dropcluster --stop $TRAVIS_PGVERSION main
export PGCLUSTER=$PGVERSION/main
fi
sudo add-apt-repository -yy ppa:pitti/postgresql
sudo apt-get update -qq
sudo sed -i -e 's/ident/trust/g' /etc/postgresql/$PGVERSION/main/pg_hba.conf
sudo service postgresql reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment