Skip to content

Commit 9c72a19

Browse files
committed
Fail travis build if db/schema.rb is missing commit of update
MSP-11616 Use `git diff --exit-code` to exit with 1 and fail the build if there is an update to db/schema.rb after `rake db:migrate` runs on travis.
1 parent 57aef9a commit 9c72a19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ before_script:
2020
- bundle exec rake --version
2121
- bundle exec rake db:create
2222
- bundle exec rake db:migrate
23+
# fail build if db/schema.rb update is not committed
24+
- git diff --exit-code
2325
script: "bundle exec rake $RAKE_TASK"
2426

2527
rvm:

0 commit comments

Comments
 (0)