Contributors and maintainers usually strike through the message after
checking `resource` blocks for updates. Let's add a checkbox to make it
easier to update the status.
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
- I was wondering why `brew bump` PRs have descriptions with both commands, like:
```
Created with `brew bump`.
---
Created by `brew bump-formula-pr`.
```
- Then I read the code and realised that "append" was the wrong word for the
`--message` arg description.
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.
Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
The existing `bump-formula-pr` regexes expect a `url` string to only
be followed by a newline. However, `url` also accepts a `specs` hash,
which can appear after the `url` string. For example:
```
url "https://www.example.com/1.2.3.tar.gz", using: :homebrew_curl
```
This commit modifies the regexes to capture anything after the `url`
string and before the newline. This works for the aforementioned
example, where the trailing hash is on the same line, but it won't
work if the hash appears on a subsequent line. For example:
```
url "https://www.example.com/1.2.3.tar.gz",
using: :homebrew_curl
```
Add some `--all` flags we'll eventually migrate to to ensure that we'll
eventually require their usage to read all formulae. Where we need to
do stuff later, add some comments.
Fix a regression from 8b1fcc7c5c18ec970c30e712ab283d7703694523.
Only if `version.nil?` is `Version.detect` used, so we can
only use `version.null?` after that. (Otherwise, it's a string.)
```
Error: undefined method `null?' for "X.Y.Z":String
Please report this issue:
https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:440:in `check_new_version'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:131:in `bump_formula_pr'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'
```
Currently, `brew bump-formula-pr` errors out without a proper message
when `--version` isn't specified and the formula's version cannot be parsed
from the URL. We fix this by returning early from `check_new_version` when the
detected version is Version::NULL.
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.