forked from discourse/discourse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: split out update process from docker test
- Loading branch information
1 parent
56a0436
commit 7289e0b
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |