Remove all code related to Bintray. It no longer works so there's no
point keeping it around.
Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.
Run `Homebrew.install_bundler_gems!` a bit earlier for some developer
commands to avoid printing gem installation output in the middle of
normal developer command output.
If the `rebuild`, `root_url`, `cellar` and checksums are all identical
between an old and new bottle block: we don't need a new bottle at
all. Handle this by deleting the relevant files with
`brew bottle --merge --write` and gracefully notifying the caller of
`brew pr-upload`.
This should avoid e.g.
39340a11ea
occurring in future.
For :all bottle blocks in linuxbrew-core, we are going to remove the bottle
block completely before rebottling.
In linuxbrew-core, we use --keep-old to keep the macOS sha lines.
I am not sure why this exception was written initially, but it
now prevents bottling these formulae, because we have no bottle block
and use --keep-old.
I think it's safe to just skip this check, when there is no bottle block
the old_checksum can just directly return nil.
Rely more heavily on the `Bottle::Filename` class rather than hacking
around things manually.
Without this the rebuilding bottles workflow is broken for `all:`
bottles.
Instead of using `libarchive` on macOS (which has a non-zero dependency
tree) let's instead use `gnu-tar` because:
- it has no dependencies
- we're already using it on Linux
I tested this locally with `ack` (which was getting reproducible bottles
with system and Homebrew `libarchive`) and saw a different checksum. A
quick read of the `gtar` manpage indicated that it uses a GNU tar format
by default which can be made consistent with BSD and GNU tar by using
`--format=ustar` with both. Once this is done, the checksums are the
same. This will hopefully ease the transition to having `all:` bottles
be consistent on Linux, too, which will be useful when homebrew-core is
fully merged/supporting Linux.
A new version of `shellcheck` (I think?) brought us so new warnings and
errors.
To fix:
- pass `--source-path` so we don't need to stop `shellcheck` trying to
read sourced files every time
- disable some more warnings/errors we don't care about fixing