From d307e5db96a3dea97c198c298440fa3750b8207e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 30 Jan 2014 17:15:16 +0100 Subject: [PATCH] brew-test-bot: handle git repositories for upload. --- Library/Contributions/cmd/brew-test-bot.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index 504c34a2c9..dad47fc940 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -431,6 +431,12 @@ if ARGV.include? '--ci-pr-upload' or ARGV.include? '--ci-testing-upload' pr = ENV['UPSTREAM_PULL_REQUEST'] number = ENV['UPSTREAM_BUILD_NUMBER'] + system "git am --abort 2>/dev/null" + system "git rebase --abort 2>/dev/null" + safe_system "git reset --hard" + safe_system "git checkout -f master" + safe_system "brew update" + if ARGV.include? '--ci-pr-upload' safe_system "brew pull --clean #{pr}" end