Now that all bottles (without existing `sha256` mismatches) have been
uploaded to GitHub Packages make it the default download location.
Will give this a few days testing before we make a tag and make this
default for everyone.
No migration has been done for Linuxbrew packages yet; those will be
done after we have fully migrated over Homebrew.
- Write a subset of the tab required for bottles as an annotation.
- Add option on new bottle creation to skip writing tab into bottle
and instead add it (and other useful metadata) to bottle JSON.
- Read formula information and tab from bottle JSON.
- Write prettier JSON to disk.
- Don't write `HEAD` to tab; this duplicates `HOMEBREW_VERSION`.
- Allow `brew bottle` to use `--json` to generate JSON files from a
local bottle file.
- make the description more generic/correct
- use "internet archive" over "archive"
- move some logic to a new `GitHubReleases` class (for consistency)
- remove some obvious comments
- extract out and move some constants
- `--no-git` and `--branch` don't conflict as `--branch` is still used
for the GitHub Actions branch even with `--no-git`
- fix some README markdown linting errors
- fix some YAML/GitHub Actions configuration linting errors
This case is _really_ slow even although it's something we encourage
people to run often and build systems often do. The `brew --prefix`
case is really fast because it's just in Bash so: let's pull the
`brew --prefix <formula>` case into Bash too.
This doesn't handle any edge-cases like `--installed` and the formula
detection is pretty simple.
Also, to make this behaviour consistent, never output `Cellar` paths
from the (Ruby) `brew --prefix`; we never want people relying on the
Cellar paths anyway, only output them if the formula wasn't installed
(where, arguably, using a Cellar path is even worse) and the speedup is
worth this deviation in behaviour.
- Enable it by default if you've run a developer command or set
`HOMEBREW_DEVELOPER`.
- Clarify the documentation that there's various configuration in which
it doesn't work.
I've rolled this out of most of GitHub's developers with no ill effects
and we've enabled it in both CI and for various maintainers so it feels
appropriate to have a bigger rollout.
- Remove `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK` and make the behaviour
the default. We mostly already do this since we added the need for
the `--build-from-source` override on macOS. This allows us to
delete some more code.
- Still fail and require `--build-from-source` when reinstalling or
upgrading if failing on a formula-specific reason e.g. the CLT is
not/no longer installed, you're using a non-default prefix.
Fixes#10623