bump-formula-pr: Determine Linux-only formulae with depends_on :linux

- We used to use `# tag "linux"` in Homebrew/linuxbrew-core for the ~50
  Linux-only formulae. As of
  6578a4aa86,
  we're using `depends_on :linux` to have a consistent syntax between
  Linux and macOS.
- Therefore, we have to change the search string for Linux-only formulae
  that determines whether or not `brew bump-formula-pr` deletes the bottle
  line.
This commit is contained in:
Issy Long 2020-02-13 21:28:12 +00:00
parent 1b2bb2380e
commit 1df8584d13
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -259,7 +259,7 @@ module Homebrew
# 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"')
if formula.path.read.include?("depends_on :linux")
replacement_pairs << [
/^ sha256 ".+" => :x86_64_linux\n/m,
"\\2",