- Use the `HOMEBREW_PORTABLE_RUBY_VERSION` environment variable to
determine the version of the Portable Ruby to use in
`vendor-install.sh` and `ruby.sh`.
- Replace the `docs/.ruby-version` file with a symlink to
`Library/Homebrew/.ruby-version`.
- Fix an incorrect `HOMEBREW_LIBRARY` comment.
- Use a simpler `HOMEBREW_USING_PORTABLE_RUBY` definition.
- start running this check again
- check the `docs` basename correctly
- use a different name (to a symlink) for the docs rubocop
configuration so that path relativity is done correctly:
https://docs.rubocop.org/rubocop/configuration.html#path-relativity
- add more wildcards to fix docs rubocop exclusions
Add `brew tab`, a new command to edit tab information, as previously
discussed in https://github.com/Homebrew/brew/pull/17125#issuecomment-2068473483.
Currently, this supports marking or unmarking formulae as installed on
request.
Sample usage:
$ brew tab --installed-on-request curl
==> curl is now marked as installed on request.
$ brew autoremove --dry-run
[no output]
$ brew tab --no-installed-on-request curl
==> curl is now marked as not installed on request.
$ brew autoremove --dry-run
==> Would autoremove 2 unneeded formulae:
curl
rtmpdump
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
- Add a special step to handle formulae.brew.sh API samples generation.
- Ignore the root URL: it always works and often is a false-positive
failure.
While we're here:
- Autofix some RuboCop offenses in the Rakefile.
`autoremove` is destructive, and it can be difficult for users to
recover from it occuring when they weren't expecting it.
Fixes#17363FixesHomebrew/discussions#5395
This reverts commit 3d114161b3c3f1a95b94e8530f5bc45bb44bbbd9.
This reverts commit efb14a0ec264c4ef408dbbd5330905dd230e979c.
- include `.ruby-version` and in the project root (and unignore in
`.gitignore`) to improve editor support which expects these files
- use the `.ruby-version` in `docs/Gemfile` to use a consistent Ruby
version here
- remove hardcoded Ruby versions from `workflows/docs` in favour of
using the `.ruby-version` file instead
- use more consistent configuration in `workflows/docs` to match
`workflows/tests`
Similarly to have we have with other commands, use Bash to speed it up.
Before:
```
$ hyperfine "brew list"
Benchmark 1: brew list
Time (mean ± σ): 559.9 ms ± 122.8 ms [User: 176.2 ms, System: 126.2 ms]
Range (min … max): 503.2 ms … 907.3 ms 10 runs
```
After:
```
$ hyperfine "brew list"
Benchmark 1: brew list
Time (mean ± σ): 223.7 ms ± 31.9 ms [User: 35.0 ms, System: 53.4 ms]
Range (min … max): 198.1 ms … 302.4 ms 10
```
Petty after comparison because someone on Homebrew/discussions compared
them:
```
$ hyperfine "brew list" "pip3 list"
Benchmark 1: brew list
Time (mean ± σ): 213.1 ms ± 22.8 ms [User: 34.2 ms, System: 49.2 ms]
Range (min … max): 191.2 ms … 272.3 ms 13 runs
Benchmark 2: pip3 list
Time (mean ± σ): 271.7 ms ± 4.6 ms [User: 191.9 ms, System: 40.0 ms]
Range (min … max): 264.7 ms … 281.4 ms 10 runs
Summary
brew list ran
1.28 ± 0.14 times faster than pip3 list
```
---
While we're here, also add the `HOMEBREW_CASKROOM` environment variable
to make things a bit cleaner and use `--caskroom` in documentation.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
This fits the use-case I've heard multiple times where people want to
rely exclusively on their artifact provider.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
- Add a (large) speedup by moving some logic to Bash for the typical
case of a normal or dev-cmd, Bash or Ruby command.
- Make `brew command` a non-developer command, I don't think it makes
sense to consider it something needed for developing Homebrew.
- Update the manpage/tests/RBI accordingly.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>