diff options
| author | Xu Cheng | 2016-03-07 18:18:36 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-03-07 19:43:46 +0800 |
| commit | 5b638901987655ddeb0a3a860cfbe50c67112516 (patch) | |
| tree | e550f39b8b9f7c400b9bb8c33c5e3d3a05a87b8f | |
| parent | 1e487edd21a55c447065a1cce3f6398b119e4669 (diff) | |
| download | brew-5b638901987655ddeb0a3a860cfbe50c67112516.tar.bz2 | |
test-bot: check if current repo is a tap
If it's not a tap, we test formula on CoreTap. This can happen
if we run test on a fork, e.g. Linuxbrew or future Homebrew/brew.
Closes Homebrew/homebrew#49844.
Signed-off-by: Xu Cheng <xucheng@me.com>
| -rw-r--r-- | Library/Homebrew/cmd/test-bot.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index b6fc301bd..71a0257ab 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -34,13 +34,14 @@ require "tap" module Homebrew BYTES_IN_1_MEGABYTE = 1024*1024 + HOMEBREW_TAP_REGEX = %r{^([\w-]+)/homebrew-([\w-]+)$} def resolve_test_tap if tap = ARGV.value("tap") return Tap.fetch(tap) end - if tap = ENV["TRAVIS_REPO_SLUG"] + if (tap = ENV["TRAVIS_REPO_SLUG"]) && (tap =~ HOMEBREW_TAP_REGEX) return Tap.fetch(tap) end @@ -48,7 +49,7 @@ module Homebrew bot_argv = ENV["UPSTREAM_BOT_PARAMS"].split " " bot_argv.extend HomebrewArgvExtension if tap = bot_argv.value("tap") - return Tap.fetch(tap) + return Tap.fetch(tap) if url_path =~ HOMEBREW_TAP_REGEX end end |
