test-bot: handle no-tap upload case.

This commit is contained in:
Mike McQuaid 2016-06-25 22:14:49 +01:00
parent 37eaf3b4d2
commit fc85a6fab6

View File

@ -795,8 +795,13 @@ module Homebrew
deep_merge_hashes hash, Utils::JSON.load(IO.read(json_file))
end
user, repo = bottles_hash.keys.first.split("/", 3)
tap = Tap.new user, repo
first_formula_name = bottles_hash.keys.first
tap = if first_formula_name.include? "/"
user, repo = bottles_hash.keys.first.split("/", 3)
Tap.new user, repo
else
CoreTap.instance
end
ENV["GIT_AUTHOR_NAME"] = ENV["GIT_COMMITTER_NAME"] = "BrewTestBot"
ENV["GIT_AUTHOR_EMAIL"] = ENV["GIT_COMMITTER_EMAIL"] = "brew-test-bot@googlegroups.com"