mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-20 12:32:39 -05:00
16 lines
333 B
Ruby
16 lines
333 B
Ruby
|
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")
|