test-bot: simplify the logic
Closes #115. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
9a6d5a4fee
commit
799d3aec15
@ -906,20 +906,13 @@ module Homebrew
|
|||||||
|
|
||||||
def test_bot
|
def test_bot
|
||||||
sanitize_ARGV_and_ENV
|
sanitize_ARGV_and_ENV
|
||||||
p ARGV
|
|
||||||
|
|
||||||
tap = resolve_test_tap
|
tap = resolve_test_tap
|
||||||
if tap.installed?
|
# Tap repository if required, this is done before everything else
|
||||||
# make sure Tap is not a shallow clone.
|
# because Formula parsing and/or git commit hash lookup depends on it.
|
||||||
# bottle revision and bottle upload rely on full clone.
|
# At the same time, make sure Tap is not a shallow clone.
|
||||||
if (tap.path/".git/shallow").exist?
|
# bottle revision and bottle upload rely on full clone.
|
||||||
safe_system "git", "-C", tap.path, "fetch", "--unshallow"
|
safe_system "brew", "tap", tap.name, "--full"
|
||||||
end
|
|
||||||
else
|
|
||||||
# Tap repository if required, this is done before everything else
|
|
||||||
# because Formula parsing and/or git commit hash lookup depends on it.
|
|
||||||
safe_system "brew", "tap", tap.name, "--full"
|
|
||||||
end
|
|
||||||
|
|
||||||
if ARGV.include? "--ci-upload"
|
if ARGV.include? "--ci-upload"
|
||||||
return test_ci_upload(tap)
|
return test_ci_upload(tap)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user