Don't run `bundle exec rake $RAKE_TASK` if `git diff --exit-code` with 1

MSP-11616

Travis runs all entries in the script section even if earlier entries
exit with 1 and only fails the build as a whole once all entries have
run by &&ing together the exit codes.  Running `bundle exec rake
$RAKE_TASK` if the db/schema.rb is missing updates is unnecessary, so
use `&&` in the script section to stop `bundle exec rake $RAKE_TASK`
from running if `git diff --exit-code` exits with 1.
bug/bundler_fix
Luke Imhoff 2014-11-17 08:12:47 -06:00
parent d5246036c4
commit eea5a40677
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
1 changed files with 1 additions and 2 deletions

View File

@ -22,8 +22,7 @@ before_script:
- bundle exec rake db:migrate
script:
# fail build if db/schema.rb update is not committed
- git diff --exit-code
- "bundle exec rake $RAKE_TASK"
- git diff --exit-code && bundle exec rake $RAKE_TASK
rvm:
- '1.9.3'