Skip to content

Commit eea5a40

Browse files
committed
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.
1 parent d524603 commit eea5a40

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ before_script:
2222
- bundle exec rake db:migrate
2323
script:
2424
# fail build if db/schema.rb update is not committed
25-
- git diff --exit-code
26-
- "bundle exec rake $RAKE_TASK"
25+
- git diff --exit-code && bundle exec rake $RAKE_TASK
2726

2827
rvm:
2928
- '1.9.3'

0 commit comments

Comments
 (0)