- Use raw.githubusercontent.com to download cask source rather than
formulae.brew.sh. This allows us to remove these files
- output the tap's current `HEAD` for both formulae and cask JSON
- use this `HEAD` for the cask-source API to get the exact file on
raw.githubusercontent.com rather than just whatever is newest (which
is what the previous API did)
- set the `Tap` correctly when creating a `Cask` from the API
- if the `formula.json` file exists: print its modified time include
`brew config`
- memoize `tap.git_head` as we'll be calling it a lot in the same
process with the same value
If you have Homebrew LLVM installed, `brew config` will show
Clang: 12.0.1 build (parse error)
because Homebrew LLVM does not give a build number. Some installations
from the system package manager do have this information, so let's show
it if it's available but skip complaining if not.
I've kept the original code for macOS because we always expect Apple's
build number to show there.
Break down `dump_verbose_config` function into "worker" functions that
display information for specific categories:
- `core_tap_config` for Core tap info
- `homebrew_config` for Homebrew/brew info
- `homebrew_env_config` for environment-related information
- `host_software_config` for Host software
Also, factor out code related to Clang into `describe_clang` function,
so that we can do:
```
f.puts "Clang: #{describe_clang}"
```
Java, XQuartz and the CLT separate header package aren't required for
everyone's Homebrew usage or a default macOS development install.
As a result, only show then in `brew config` when they are actually
installed.
brew test-bot --ci-upload is run on a Linux machine.
The macOS bottles have a prefix of "/usr/local".
The default prefix on Linux is /home/linuxbrew/.linuxbrew.
Elide prefix "/usr/local" in the bottle block, even it does not match
the default prefix. Ditto for cellar.
- Ensure that `HOMEBREW_TEMP` is only displayed in `brew config` when
it's non-default.
- Attempt to create a missing `HOMEBREW_TEMP` directory rather than
failing to `realpath`. Note this will still fail on permissions errors
which is to be expected.