Regression introduced in f90612ccf0db03681dc6cbf6585cca5bc27b84b1 (#6718).
`tap_full_name` returned from `use_correct_linux_tap` has been
required (`GitHub.create_fork(tap_full_name)`), but it was never set when the
formula is guessed from args.url, resulting in an API request to
https://api.github.com/repos//forks which 404s (note the missing :owner/:repo),
and subsequently
Error: Unable to fork: Not Found!
- We have some Linux-only formulae that don't have bottles.
- Previously, bumping a Linux-only formula that didn't have a bottle
line - eg, `adoptopenjdk` which is `bottle :unneeded` - would fail:
```
Error: inreplace failed
/app/linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/adoptopenjdk.rb:
expected replacement of /^ sha256 ".+" => :x86_64_linux\n/m with "\2"
```
- 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.
- The `--local` option doesn't exist in early versions of git (~1.7),
but its behaviour is the default (saving in the current repo's .git
directory).
- As it's the default across versions, we don't need to specify it
everywhere.
- Reported in Linuxbrew/install issue 78.
This commit makes it possible to use `bump-formula-pr` on linux to
contribute to `homebrew-core` as easily as it is on macOS, but with some
additional steps made before actual bumping of the formula.
Differences in the process (before bumping):
- add `homebrew-core` remote named `homebrew`
- fetch `homebrew/master`
- check if formula exists in `homebrew-core`
- switch to `homebrew/master` ref