Commit 2b5f2366ee3e33eafca041316053a15e42ad0728

Authored by Andrew Kane
1 parent 94031e9d

Moved all before install commands into script

.travis.yml
... ... @@ -5,8 +5,7 @@ services:
5 5 - elasticsearch
6 6 - mongodb
7 7 before_install:
8   - - wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.deb && sudo dpkg -i elasticsearch-1.3.2.deb && sudo service elasticsearch restart
9   - - ./ci/nobrainer.sh
  8 + - ./ci/before_install.sh
10 9 script: bundle exec rake test
11 10 before_script:
12 11 - psql -c 'create database searchkick_test;' -U postgres
... ...
ci/before_install.sh 0 → 100755
... ... @@ -0,0 +1,14 @@
  1 +#!/usr/bin/env bash
  2 +
  3 +wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.deb
  4 +sudo dpkg -i elasticsearch-1.3.2.deb
  5 +sudo service elasticsearch restart
  6 +
  7 +if [ -n "$NOBRAINER" ]; then
  8 + source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
  9 + wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
  10 + sudo apt-get update -q
  11 + sudo apt-get install rethinkdb
  12 + sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
  13 + sudo service rethinkdb restart
  14 +fi
... ...
ci/nobrainer.sh
... ... @@ -1,10 +0,0 @@
1   -#!/usr/bin/env bash
2   -
3   -if [ -n "$NOBRAINER" ]; then
4   - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
5   - wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
6   - sudo apt-get update -q
7   - sudo apt-get install rethinkdb
8   - sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
9   - sudo service rethinkdb restart
10   -fi