Skip to content
Snippets Groups Projects
Commit 37eaf3b4 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

test-bot: fix testing job bottle upload.

parent cb711a2d
No related branches found
No related tags found
No related merge requests found
......@@ -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"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment