46 Commits

Author SHA1 Message Date
Douglas Eichelberger
c50fb2dbd2 Remove redundant cli/parser requires 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
ba5f392d4c Port Homebrew::DevCmd::Typecheck 2024-03-22 09:33:28 -07:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Mike McQuaid
ab16b59ee7
Merge pull request #16116 from iMichka/dep2
brew unbottled: skip deprecated
2023-10-18 09:08:27 +01:00
Mike McQuaid
f656f8db97
dev-cmd/unbottled: more idiomatic Ruby. 2023-10-18 08:52:25 +01:00
apainintheneck
e48c155f42 dev-cmd/unbottled: share common parts of bottle tag regex
This makes it easier to see that the two regexes are related
and could make it easier to change them in the future if
need be.
2023-10-17 22:41:50 -07:00
Michka Popoff
651cef6f6b
brew unbottled: skip deprecated formulae
We are not interested in bottling them
2023-10-17 23:12:22 +02:00
apainintheneck
83598bb950 cmd/unbottled: Address review feedback for --lost
- Add heading message to indicate bottle tag used
- Use --no-ext-diff with git to avoid potential problems
- Resolve formula renames to avoid false positives
- Increase parsing stringency
2023-10-16 20:51:38 -07:00
apainintheneck
20f00a6427 dev-cmd/unbottled: add --lost option
This option tries to find bottles where the bottle was removed
from the formula in the past week and not added back in.

It checks the output of `git log` to see if there are any
bottles that fit this criteria.
2023-10-15 16:05:17 -07:00
Bo Anderson
835ebedd18
dev-cmd/unbottled: speed up dependent fetching 2023-09-27 17:45:29 +01:00
hyuraku
adc2a2fea1 remove ARGV from Formula#all 2023-09-02 19:35:22 +09:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Markus Reiter
0d56b97b07
Add SimulateSystem::with. 2023-05-14 01:45:04 +02:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
a237a1ff9f Update call sites 2023-04-04 18:14:54 -07:00
Nanda H Krishna
3113b44d1f
brew unbottled: fix XcodeRequirement handling on Linux 2023-03-07 14:12:40 -05:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Mike McQuaid
6b4363092d
Revert "Merge pull request #14548 from Homebrew/revert-14382-deprecate-disable-remove"
This reverts commit 932d2cf3b77c9439a57b6a43577fc8d3b6399a62, reversing
changes made to f4e60482791d2ff628efadfdbf0d14d9237d2d29.
2023-02-07 19:25:51 +01:00
Mike McQuaid
6882ac17e7
Revert "Add deprecations and disables" 2023-02-07 15:13:19 +01:00
Mike McQuaid
59c03cb2a6
Add deprecations and disables
Do the usual dance:
- commented `odeprecated` to `odeprecated`
- `odeprecated` to `odisabled`
- `odisabled` removed
2023-02-03 10:48:43 +00:00
Bo Anderson
bca9eb05d1
dev-cmd/unbottled: simulate target tag 2022-11-16 00:07:31 +00:00
Bo Anderson
e47988a12b
dev-cmd/unbottled: fix --dependents erroring 2022-10-25 15:44:29 +01:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
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.
2022-09-05 13:57:22 +01:00
Rylan Polster
b896f6cb0d
Allow more developer commands with HOMEBREW_INSTALL_FROM_API 2022-06-16 21:31:15 -04:00
Mike McQuaid
1bb44979ee
Disable and delete code for 3.5.0
The next planned release will be 3.5.0 so let's fix things up for there.
2022-05-30 14:59:14 +01:00
Michael Cho
a1921b8141
dev-cmd/unbottled: ignore versioned macos when checking linux 2022-03-29 18:01:16 -07:00
Mike McQuaid
79891a7103
Update uses of Formula.all/Cask::Cask.all
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.
2022-03-08 19:24:56 +00:00
Mike McQuaid
3a709d36b2
Start process to remove Enumerable from Formula and Cask::Cask.
This is the first step to address
https://github.com/Homebrew/brew/issues/11292.
2022-01-03 14:59:10 +00:00
Steve Peters
aa4e39785c
dev-cmd/unbottled: don't skip non-core formulae
Related to Homebrew/homebrew-test-bot#705

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
2021-11-18 08:13:44 -08:00
Rylan Polster
737dd1654b
Refactor API methods 2021-08-06 04:31:27 -04:00
Bo Anderson
984226d5b5
dev-cmd/unbottled: fix arch requirement handling 2021-05-31 15:24:20 +01:00
Misty De Méo
1978f4be65 Unbottled: fix use of invalid argument 2021-04-26 11:44:35 -07:00
Mike McQuaid
6b5213286c
Rename "exact" tag match to "no_older_versions"
This is more specific about the behaviour we want to have in future.
2021-04-09 09:36:18 +01:00
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Mike McQuaid
9663567501
Fix brew style. 2021-03-01 13:43:47 +00:00
Bo Anderson
fb8b247db3
dev-cmd/unbottled: various improvements
* Ignore bottles for older macOS versions
* Ignore disabled formulae
* Ignore formulae which can't build on the chosen macOS
* Improve/fix sort description
2021-02-23 16:27:58 +00:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
cf654da251
dev-cmd: indicate multiple named args in usage banner 2021-01-15 13:04:07 +01:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Mike McQuaid
d20b946cfe
dev-cmd/unbottled: improve output.
Handle a few more edge cases:
- improve the unbottled output heading so it makes sense when we're
  outputting bottles that are ready to bottle
- output already bottled formulae if named
- handle Linux/Mac requiring formulae and output if named
- output bottle unneeded/disabled formulae if named
- use green/yellow/red for bottles ready to be built now/later/never
2020-12-28 11:36:12 +00:00
Francois-Xavier Coudert
93cfc27660 unbottled: improve output 2020-12-23 14:45:11 +01:00
Markus Reiter
749199632b Add signatures for dev-cmd/unbottled. 2020-11-29 22:37:24 +01:00
Issy Long
ca999a81f7
dev-cmd/unbottled: Fail nicely if analytics data can't be retrieved
- When testing `brew unbottled <formula>` this crashed because I, as a
  maintainer, have `HOMEBREW_NO_ANALYTICS` set on all my machines to
  avoid polluting the analytics with test installs.

```
❯ brew unbottled
==> Getting formulae...
==> Getting analytics data...
Error: undefined method `[]' for nil:NilClass
/usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:89:in `formulae_all_sort_installs_from_args'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:49:in `unbottled'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
```
2020-11-26 21:21:48 +00:00
Mike McQuaid
135b5a3679
dev-cmd/unbottled: add new command.
Add a new command to list formulae that aren't bottled for a given OS.
2020-11-26 08:22:06 +00:00