From 359dc9674c1bfa46bd6f91e99ff9e2b8470d1bbd Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Sat, 18 Jan 2020 00:08:22 +0100 Subject: [PATCH] bump-formula-pr: delete linux sha256 line if required Co-Authored-By: Mike McQuaid --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 2b16fb8c22..0fa0e4debe 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -256,6 +256,16 @@ module Homebrew ] end + # When bumping a linux-only formula, + # one needs to also delete the sha256 linux bottle line. + # That's because of running test-bot with --keep-old option in linuxbrew-core. + if formula.path.read.include?('# tag "linux"') + replacement_pairs << [ + /^ sha256 ".+" => :x86_64_linux\n/m, + "\\2", + ] + end + if forced_version && forced_version != "0" if requested_spec == :stable if File.read(formula.path).include?("version \"#{old_formula_version}\"")