43126 Commits

Author SHA1 Message Date
Ruoyu Zhong
a50e15e43c
cmd/list: support using --full-name with --installed-on-request et al.
Fixes https://github.com/Homebrew/brew/issues/18908#issuecomment-2532926860.
2024-12-11 11:27:08 +08:00
Douglas Eichelberger
69f2d3bf32
Merge branch 'master' into no-ostruct 2024-12-10 11:00:32 -08:00
Mike McQuaid
29e9087537
Merge pull request #18912 from Homebrew/merge_group_not_push
github/workflows: use merge_group instead of push events.
2024-12-10 17:32:53 +00:00
Mike McQuaid
abb330d496
github/workflows: use merge_group instead of push events.
We're currently doing both which doubles the number of jobs we end up
running for commits on `master`.
2024-12-10 17:19:20 +00:00
Patrick Linnane
eae8d1b769
Merge pull request #18911 from Homebrew/dependabot/github_actions/actions/attest-build-provenance-2.1.0
build(deps): bump actions/attest-build-provenance from 2.0.1 to 2.1.0
2024-12-10 16:52:10 +00:00
dependabot[bot]
84f0617309
build(deps): bump actions/attest-build-provenance from 2.0.1 to 2.1.0
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](c4fbc64884...7668571508)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-10 16:39:21 +00:00
Mike McQuaid
5a4d643d7f
Merge pull request #18910 from chenrui333/deuniversalize_machos-raise-error
chore(formula): raise error if no universal binaries are found to deuniversalize
2024-12-10 15:13:29 +00:00
Rui Chen
52569372bb
chore(formula): raise error if no universal binaries are found to deuniversalize
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-12-10 09:26:27 -05:00
Mike McQuaid
03d29a5743
Merge pull request #18909 from Homebrew/tap-new-multiuser
dev-cmd/tap-new: improve handling of multi-user setups
2024-12-10 09:08:45 +00:00
Bo Anderson
ccdf39ff4e
dev-cmd/tap-new: improve handling of multi-user setups 2024-12-10 05:24:10 +00:00
Mike McQuaid
ad356d3658
Merge pull request #18903 from Homebrew/livecheck/pypi-handle-regex
Pypi: Restore regex support
4.4.11
2024-12-09 09:11:29 +00:00
Mike McQuaid
ff7b9534f6
Merge pull request #18904 from Homebrew/update-cask-uninstall-trash-messaging
cask/artifact/abstract_uninstall: handle sudo trashed paths correctly
2024-12-09 09:11:14 +00:00
apainintheneck
ebede56314 cask/artifact/abstract_uninstall: handle sudo trashed paths correctly
This showed a confusing message when the trash path was able to be
deleted using sudo since the untrashable array was updated but
the check was higher up for returning early.

```
==> Trashing files:
/Users/Shared/Maxon
/Users/Shared/Red Giant
~/Library/Application Support/Maxon
~/Library/Application Support/Red Giant
~/Library/Caches/net.maxon.app-manager
~/Library/Preferences/Maxon
~/Library/Preferences/net.maxon.app-manager.plist
~/Library/Saved Application State/net.maxon.app-manager.savedState
==> Using sudo to gain ownership of path '/Users/Shared/Maxon'
==> Using sudo to gain ownership of path '/Users/Shared/Red Giant'
Warning: The following files could not be trashed, please do so manually:
==> Removing all staged versions of Cask 'maxon'
```

The warning about files not getting trashed should only be shown if
some files didn't get trashed.

Fixes https://github.com/Homebrew/brew/issues/18901
2024-12-08 15:53:59 -08:00
Sam Ford
270313f649
Pypi: Restore regex support
We recently updated the `Pypi` strategy to use the PyPI JSON API and
the default strategy behavior no longer relies on a regex, so the initial implementation didn't include regex handling. This restores
support for a `livecheck` block regex by updating the `DEFAULT_BLOCK`
logic to handle an optional regex. This allows us to use a regex to
omit parts of the `info.version` value without having to duplicate
the default block logic in a `strategy` block only to use a regex.

This isn't currently necessary for any existing formulae using the
`Pypi` strategy but we have a few that needed a custom regex with
the previous strategy approach, so they may need this functionality
in the future. Besides that, restoring regex support to `Pypi`
ensures that `livecheck`/`strategy` blocks work in a fairly
consistent manner across strategies.
2024-12-08 14:29:44 -05:00
Sam Ford
08c927b6a1
Json: Allow nil regex block argument
This updates the block-handling logic in `Json::versions_from_content`
to naively pass the regex value when the block has two parameters. Up
to now, we have been ensuring that `regex` is not `nil` and this
makes sense with existing usage (the `Crate` strategy's default
block, formulae/cask `strategy` blocks). However, we need to allow a
`nil` `regex` value to make it possible to add an optional `regex`
parameter in the `Pypi::DEFAULT_BLOCK` Proc. This is necessary to
allow the `Pypi` strategy to work with an optional regex from a
`livecheck` block again [without creating an additional
`DEFAULT_BLOCK` variant with a regex parameter].
2024-12-08 14:29:44 -05:00
Douglas Eichelberger
ce9216e66c Fix use of tap 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
73046d68ff Make cli_args idiomatic 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
aa7da18d88 Access table internally 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
659f993dab Avoid exposing table 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
6d19b84ef1 Fix args validation 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
2902eec390 Use table lookups 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
1a83801587 Add special case for #tap 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
fef1211c19 Use method result table
foo
2024-12-08 10:28:10 -08:00
Douglas Eichelberger
3ea76b8498 Avoid re-defining #formula? 2024-12-08 10:28:09 -08:00
Douglas Eichelberger
3a4243742f Remove OpenStruct from CLI::Args 2024-12-08 10:27:49 -08:00
Douglas Eichelberger
8fa9b72a96
Merge pull request #18902 from Homebrew/cli-cleanup 2024-12-08 08:40:04 -08:00
Sam Ford
b13a4c5dbb
Merge pull request #18895 from chenrui333/update-to-use-json-endpoint
fix(livecheck/pypi): update to use json endpoint to query version
2024-12-07 23:23:01 -05:00
Sam Ford
ac4854ef9e
Pypi: Expand test coverage
Among other things, the previous commit added a `provided_content`
paramter to `Pypi::find_versions`, so this takes advantage of that to
expand `Pypi` test coverage to 100%.
2024-12-07 20:44:56 -05:00
Sam Ford
935eb89eca
Pypi: Rework to use Json::find_versions
This reworks the new `Pypi` JSON API implementation to use
`Json::find_versions` in `Pypi::find_versions`, borrowing some of the
approach from the `Crate` strategy.

Besides that, this pares down the fields in the
`::generate_input_values` return hash to only `:url`, as we're not
using a generated regex to match version information in this setup.

This adds a `provided_content` parameter to `::find_versions` as part
of this process and I will expand the `Pypi` tests to increase
coverage (like the `Crates` tests) in a later PR. 75% of `Pypi` checks
are failing at the moment (with some returning inaccurate version
information), so the current priority is getting this fix merged in
the short-term.
2024-12-07 20:40:55 -05:00
Ruoyu Zhong
8896086cb1
Merge pull request #18897 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11690
build(deps-dev): bump sorbet from 0.5.11685 to 0.5.11690 in /Library/Homebrew
2024-12-08 03:19:28 +08:00
BrewTestBot
103e371fec
brew vendor-gems: commit updates. 2024-12-07 19:09:57 +00:00
Ruoyu Zhong
5cd3116ba3
Merge pull request #18896 from Homebrew/dependabot/github_actions/ruby/setup-ruby-1.203.0
build(deps): bump ruby/setup-ruby from 1.202.0 to 1.203.0
2024-12-08 03:09:27 +08:00
Kevin
f16f64154d
Merge pull request #18900 from Homebrew/fix-utils-service-require-error
Add missing utils/service require
2024-12-07 11:01:42 -08:00
apainintheneck
9567d57e39 Add missing utils/service require
This was originally added in https://github.com/Homebrew/brew/pull/18865.

```console
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
/usr/local/Homebrew/Library/Homebrew/service.rb:458:in `block in to_systemd_unit': uninitialized constant Utils::Service (NameError)
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `map'
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `to_systemd_unit'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `bind_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `validate_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
        from -e:1:in `<main>'
```

```console
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
"[Unit]\nDescription=Homebrew generated unit for activemq\n\n[Install]\nWantedBy=default.target\n\n[Service]\nType=simple\nExecStart=\"/usr/local/opt/activemq/bin/activemq\" \"console\"\nWorkingDirectory=/usr/local/opt/activemq/libexec\n"
```
2024-12-07 10:35:33 -08:00
dependabot[bot]
895f130c2d
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11685 to 0.5.11690.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 17:17:01 +00:00
dependabot[bot]
52dc5cd0be
build(deps): bump ruby/setup-ruby from 1.202.0 to 1.203.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.202.0 to 1.203.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](a2bbe5b1b2...2a18b06812)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 17:16:55 +00:00
Douglas Eichelberger
06aaeafa4f Minor CLI code improvements 2024-12-07 08:09:15 -08:00
Rui Chen
d49e01b82b
fix(livecheck/pypi): update to use json endpoint to query version
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-12-07 02:00:18 -05:00
Ruoyu Zhong
405cedad23
Merge pull request #18893 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11685
build(deps-dev): bump sorbet from 0.5.11681 to 0.5.11685 in /Library/Homebrew
2024-12-07 10:35:36 +08:00
Douglas Eichelberger
c1f664d52b
Merge pull request #18894 from Homebrew/unsafe-cleanup
Remove unsafe references from CLI and Formulary code
2024-12-06 13:14:33 -08:00
BrewTestBot
d341e71977
brew vendor-gems: commit updates. 2024-12-06 20:43:08 +00:00
dependabot[bot]
a3ab824e84
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11681 to 0.5.11685.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-06 20:35:34 +00:00
Douglas Eichelberger
e2d10337f3 Fix alias_name logic 2024-12-06 11:25:51 -08:00
Douglas Eichelberger
ba9581f2c2
Merge pull request #18890 from Homebrew/dependabot/github_actions/codecov/codecov-action-5.1.1
build(deps): bump codecov/codecov-action from 5.1.0 to 5.1.1
2024-12-06 11:14:48 -08:00
Douglas Eichelberger
2a5715e352
Merge pull request #18889 from Homebrew/dependabot/github_actions/actions/attest-build-provenance-2.0.1
build(deps): bump actions/attest-build-provenance from 2.0.0 to 2.0.1
2024-12-06 11:14:25 -08:00
Douglas Eichelberger
9a2b386a52 Remove unsafe references from CLI and Formulary code 2024-12-06 11:06:27 -08:00
dependabot[bot]
88c52b18fd
build(deps): bump codecov/codecov-action from 5.1.0 to 5.1.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](c2fcb216de...7f8b4b4bde)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-06 18:03:01 +00:00
dependabot[bot]
4a1e0324bc
build(deps): bump actions/attest-build-provenance from 2.0.0 to 2.0.1
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](619dbb2e03...c4fbc64884)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-06 18:02:58 +00:00
Mike McQuaid
710b4e794c
Merge pull request #18888 from Homebrew/docs_merge_groups
workflows/docs: enable merge queue/group jobs.
2024-12-06 17:57:53 +00:00
Mike McQuaid
8bac4412d5
workflows/docs: enable merge queue/group jobs.
This should allow us to make use of the GitHub merge queue to ensure
that we're not merging outdated code (or breaking `master`) but avoiding
the need to continually merge into/rebase PR branches.

This should be safe to merge as-is as is essentially a no-op without
the merge queue enabled.
2024-12-06 17:35:38 +00:00