diff --git a/.rultor.yml b/.rultor.yml index dc5f647..e8f99d1 100644 --- a/.rultor.yml +++ b/.rultor.yml @@ -31,7 +31,7 @@ merge: sudo sh -c 'echo "host all all localhost trust" > /etc/postgresql/9.3/main/pg_hba.conf' sudo sh -c 'echo "local all all trust" >> /etc/postgresql/9.3/main/pg_hba.conf' sudo service postgresql start - sleep 30 + sleep 30s psql -c 'create database nativejson;' -U postgres mvn install -Pci -B --settings ../settings.xml @@ -40,13 +40,7 @@ env: release: script: |- - sudo apt-get update -y - sudo apt-get install -y postgresql-9.3 - sudo sh -c 'echo "host all all localhost trust" > /etc/postgresql/9.3/main/pg_hba.conf' - sudo sh -c 'echo "local all all trust" >> /etc/postgresql/9.3/main/pg_hba.conf' - sudo service postgresql start - sleep 30 - psql -c 'create database nativejson;' -U postgres + ./initialize_postgres.sh mvn versions:set "-DnewVersion=${tag}" git commit -am "${tag}" mvn deploy -Pci -B -Prelease --settings ../settings.xml -Dgpg.homedir=.. diff --git a/initialize_postgres.sh b/initialize_postgres.sh new file mode 100755 index 0000000..f2f649b --- /dev/null +++ b/initialize_postgres.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# install postgresql, wait for it to start and then create test database + +set -x + +sudo sh -c 'echo "host all all localhost trust" > /etc/postgresql/9.3/main/pg_hba.conf' +sudo sh -c 'echo "local all all trust" >> /etc/postgresql/9.3/main/pg_hba.conf' +sudo rm /usr/bin/psql +sudo ln -s /usr/lib/postgresql/9.3/bin/psql /usr/bin/psql +sudo service postgresql start +sleep 30s +sudo service postgresql status +psql -c 'create database nativejson;' -U postgres