mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
Refactor: split out update process from docker test
This commit is contained in:
parent
56a04366ec
commit
7289e0b5fd
1 changed files with 15 additions and 0 deletions
15
script/docker_test.rb
Normal file
15
script/docker_test.rb
Normal file
|
@ -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")
|
Loading…
Reference in a new issue