aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/test-bot.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb
index 3579e9f79..8c72c818a 100644
--- a/Library/Homebrew/dev-cmd/test-bot.rb
+++ b/Library/Homebrew/dev-cmd/test-bot.rb
@@ -764,8 +764,6 @@ module Homebrew
end
def test_ci_upload(tap)
- raise "Need a tap to upload!" unless tap
-
# Don't trust formulae we're uploading
ENV["HOMEBREW_DISABLE_LOAD_FORMULA"] = "1"
@@ -792,6 +790,14 @@ module Homebrew
return if bottles.empty?
FileUtils.cp bottles, Dir.pwd, :verbose => true
+ json_files = Dir.glob("*.bottle.json")
+ bottles_hash = json_files.reduce({}) do |hash, json_file|
+ 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
+
ENV["GIT_AUTHOR_NAME"] = ENV["GIT_COMMITTER_NAME"] = "BrewTestBot"
ENV["GIT_AUTHOR_EMAIL"] = ENV["GIT_COMMITTER_EMAIL"] = "brew-test-bot@googlegroups.com"
ENV["GIT_WORK_TREE"] = tap.path
@@ -811,7 +817,6 @@ module Homebrew
safe_system "brew", "pull", "--clean", pull_pr
end
- json_files = Dir.glob("*.bottle.json")
system "brew", "bottle", "--merge", "--write", *json_files
remote = "git@github.com:BrewTestBot/homebrew-#{tap.repo}.git"
@@ -820,10 +825,6 @@ module Homebrew
formula_packaged = {}
- bottles_hash = json_files.reduce({}) do |hash, json_file|
- deep_merge_hashes hash, Utils::JSON.load(IO.read(json_file))
- end
-
bottles_hash.each do |formula_name, bottle_hash|
version = bottle_hash["formula"]["pkg_version"]
bintray_package = bottle_hash["bintray"]["package"]