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

test-bot: add flag to reset repository and taps.

parent b6f9eb08
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,11 @@
# --dry-run: Just print commands, don't run them.
# --fail-fast: Immediately exit on a failing step.
#
# --ci-master: Shortcut for Homebrew master branch CI options.
# --ci-pr: Shortcut for Homebrew pull request CI options.
# --ci-testing: Shortcut for Homebrew testing CI options.
# --ci-upload: Homebrew CI bottle upload.
# --ci-master: Shortcut for Homebrew master branch CI options.
# --ci-pr: Shortcut for Homebrew pull request CI options.
# --ci-testing: Shortcut for Homebrew testing CI options.
# --ci-upload: Homebrew CI bottle upload.
# --ci-reset-and-update: Homebrew CI repository and tap reset and update.
require 'formula'
require 'utils'
......@@ -660,6 +661,15 @@ module Homebrew
end
end
if ARGV.include? "--ci-reset-and-update"
safe_system "git", "reset", "--hard"
Dir.glob("#{HOMEBREW_LIBRARY}/Taps/*/*") do |tap|
cd tap { safe_system "git", "reset", "--hard" }
end
safe_system "brew", "update"
return
end
if ARGV.include? '--ci-upload'
jenkins = ENV['JENKINS_HOME']
job = ENV['UPSTREAM_JOB_NAME']
......
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