Skip to content

Commit

Permalink
Refactor: split out update process from docker test
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Jun 19, 2014
1 parent 56a0436 commit 7289e0b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions script/docker_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
def run_or_fail(command)
pid = Process.spawn(command)
Process.wait(pid)
exit 1 unless $?.exitstatus == 0
end

unless ENV['NO_UPDATE']
run_or_fail("git remote update")

checkout = ENV['COMMIT_HASH'] || "HEAD"
run_or_fail("git checkout #{checkout}")
run_or_fail("bundle")
end

run_or_fail("bundle exec rake docker:test")

0 comments on commit 7289e0b

Please sign in to comment.