This reverts commit b4cd90a3cc47bc2f94e4449fa99b37445b878a5f.
This should never have been merged, given its extraction into PR 15062
had a reasonably long discussion and was decided against in
https://github.com/Homebrew/homebrew-core/pull/126705#discussion_r1149545828,
but I didn't realise I hadn't backed it out of PR 15060 before it was
approved and I merged it.
- request `autosquash` from the publish job in `pr-publish` if the PR is
labelled with `autosquash`
- show a warning in `pr-pull` if called without `--autosquash` on a PR
with the autosquash label.
We will now no longer be squashing commits by default, so it makes sense
to default to doing nothing but still autosquash commits when requested
with `--autosquash`.
- Make copying to `*_names.before.txt` the responsibility of `update.sh`
(unless the file doesn't exist at all). This provides the added
benefit of allowing the inspection of the before/after state after
running a `brew update` rather than both files always being identical
at this point.
- State `No changes to formulae or casks.` on macOS.
- Rename and flip `updated_formula_report` to `auto_update`; this naming
was confusing every time.
- Only display the `You can upgrade with...` messaging if we're not
auto-updating as sometimes it will be displayed before the commands it
references (e.g. `upgrade`, `outdated` or an `install` that proceeds
to upgrade these formulae).
Fixes https://github.com/Homebrew/brew/issues/15065
This wasn't working with casks because the bottle tag
would be nil here.
It was refactored to not use the bottle tag because
casks don't have bottles.
I also moved the valid_casks? method to extend/os/mac
because casks only run on macOS and the generic OS
tests were failing before.
- Previously this components order cop only checked for correct stanza
order inside `on_*` blocks. This commit extends this cop to also check
for correct stanza order inside `head` and `resource` blocks. This is
a positive change since it standardizes the order of stanzas in all of
the places, making formulae more readable.
- Fixes issue 14017.
- This still doesn't pass `brew readall` for Casks, but it gets us a
little closer since if `url` has a `version` interpolated in it, the
`version` stanza has to come first.
- See https://github.com/Homebrew/homebrew-cask/pull/143201 for the
current failures.
- This, ie Mojave first, is more common in real Casks than the
alternative of newest to oldest ie Ventura first.
- Doing it this way reduces the number of offenses from ~500 to ~200.
- Complaining about only `on_arm` and `on_intel` was too restrictive
since casks can have many `on_system` blocks (`on_#{arch}` and
`on_#{os}`).
- We're a bit of the way there, anyway. Still doesn't support stanza
ordering within blocks, but that's for another time (there's a
separate issue that's been open for a while - 14017).