diff --git a/Library/Homebrew/dev-cmd/bump-cask-pr.rb b/Library/Homebrew/dev-cmd/bump-cask-pr.rb index 3654de10b283f2..4bfdd79aa47b46 100644 --- a/Library/Homebrew/dev-cmd/bump-cask-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-cask-pr.rb @@ -89,6 +89,14 @@ def bump_cask_pr odie "This cask is not in a tap!" if cask.tap.blank? odie "This cask's tap is not a Git repository!" unless cask.tap.git? + autobump_file_path = cask.tap.path/".github/autobump.txt" + if cask.tap.core_cask_tap? && File.readlines(autobump_file_path).grep(/#{cask.name}/).any? + odie <<~EOS + This cask is autobumped! + Don't worry, BrewTestBot will automatically bump it for you! + EOS + end + new_version = BumpVersionParser.new( general: args.version, intel: args.version_intel, diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 634fa73110e28b..252fffa354994f 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -112,6 +112,14 @@ def bump_formula_pr odie "This formula is not in a tap!" if formula.tap.blank? odie "This formula's tap is not a Git repository!" unless formula.tap.git? + autobump_file_path = formula.tap.path/".github/autobump.txt" + if formula.tap.core_tap? && File.readlines(autobump_file_path).grep(/#{formula.name}/).any? + odie <<~EOS + This formula is autobumped! + Don't worry, BrewTestBot will automatically bump it for you! + EOS + end + formula_spec = formula.stable odie "#{formula}: no stable specification found!" if formula_spec.blank?