From 2ec5423356e51dde343b1fa69e3e7c07c3aa4a8e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 11 Sep 2016 11:28:15 +0100 Subject: [PATCH] test-bot: --ci-upload can upload from current dir. Look in the current directory rather than only allowing upload from Jenkins. --- Library/Homebrew/dev-cmd/test-bot.rb | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb index 154ac5958c..aa7b4ba70f 100644 --- a/Library/Homebrew/dev-cmd/test-bot.rb +++ b/Library/Homebrew/dev-cmd/test-bot.rb @@ -875,11 +875,6 @@ module Homebrew # Don't trust formulae we're uploading ENV["HOMEBREW_DISABLE_LOAD_FORMULA"] = "1" - jenkins = ENV["JENKINS_HOME"] - job = ENV["UPSTREAM_JOB_NAME"] - id = ENV["UPSTREAM_BUILD_ID"] - raise "Missing Jenkins variables!" if !jenkins || !job || !id - bintray_user = ENV["BINTRAY_USER"] bintray_key = ENV["BINTRAY_KEY"] if !bintray_user || !bintray_key @@ -891,11 +886,20 @@ module Homebrew ENV["HUDSON_SERVER_COOKIE"] = nil ENV["JENKINS_SERVER_COOKIE"] = nil ENV["HUDSON_COOKIE"] = nil + ENV["COVERALLS_REPO_TOKEN"] = nil ARGV << "--verbose" - bottles = Dir["#{jenkins}/jobs/#{job}/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.*"] - return if bottles.empty? + bottles = Dir["*.bottle*.*"] + if bottles.empty? + jenkins = ENV["JENKINS_HOME"] + job = ENV["UPSTREAM_JOB_NAME"] + id = ENV["UPSTREAM_BUILD_ID"] + raise "Missing Jenkins variables!" if !jenkins || !job || !id + bottles = Dir["#{jenkins}/jobs/#{job}/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.*"] + return if bottles.empty? + end + FileUtils.cp bottles, Dir.pwd, :verbose => true json_files = Dir.glob("*.bottle.json")