134 Commits

Author SHA1 Message Date
Douglas Eichelberger
65f8420232 Make things private 2024-03-30 16:43:11 -07:00
Douglas Eichelberger
90cd9d2e0a Port Homebrew::Cmd::FetchCmd 2024-03-29 18:53:08 -07:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Bo Anderson
310b5ecbe7
Introduce Formulary platform cache 2024-01-09 11:12:49 +00:00
Bo Anderson
337a8fc6ea
cmd/fetch: support retrying manifest downloads 2023-10-13 21:14:07 +01:00
Eric Knibbe
8e01227add
cmd/deps: show deps for head spec with --HEAD
Plus a few man page fixes
2023-10-13 00:29:09 -04:00
Eric Knibbe
075ee81ab7
cmd/fetch: restore --HEAD functionality 2023-10-07 10:50:03 -04:00
apainintheneck
1dc9274f62 Improve cask audit
- check for cask.url in audit steps
- check for cask.version in audit steps
- check for cask.sha256 in fetch command
- stop omitting casks based on nil url in audit command

It would be nice to be able to omit casks from the audit
if the os is not supported but there is not easy way to
do that without updating the SimulateSystem code or
refactoring how MacOSRequirement's are defined in the DSL.
2023-09-07 20:38:17 -07:00
apainintheneck
f4b15e95ac cmd/fetch & cmd/audit: handle unsupported os/arch combos
It's possible for casks to only run on certain os/arch
combinations but we don't check for them in the fetch and
audit commands.

At first, I tried to check if the macos version was satisfied
in a previous PR but that doesn't work correctly because
MacOSRequirement and ArchRequirement don't respect SimulateSystem.

Instead I'm just checking to see if the url stanza is defined
for each os/arch combination and skipping those casks where
it ends up being nil. This is kind of brute forcing it but
should work.
2023-09-04 15:00:31 -07:00
Mike McQuaid
4ad5321d03
Merge pull request #15937 from MikeMcQuaid/cleanup_todo
Cleanup various TODOs
2023-09-03 09:29:03 -04:00
Mike McQuaid
f73607553c
Cleanup various TODOs
These were also easily fixed, already fixed or incorrect and
non-controversial.

Co-authored-by: Issy Long <issyl0@github.com>
2023-09-03 09:12:41 -04:00
apainintheneck
8c2f101138 cmd/fetch: handle nil cask urls
These urls can be nil if there is an unsatisfied macos version
requirement. We check for false here because either the macos
requirement can be satisfied and return true or can not be
specified and return nil. If it's not specified, it means it
can run on any macos version.

The change in Cask::Download should provide better error messages
in Downloadable but honestly we're better off just checking for
the missing url higher up the call stack which is why I made
the changes in the fetch command. Either way it seemed like
a good idea while I'm here.
2023-09-02 20:56:55 -07:00
Markus Reiter
4cffb51b80
Fix wrong method in --cache and fetch. 2023-05-22 22:09:17 +02:00
Markus Reiter
486c3765ce
Add --os=all and --arch=all options. 2023-05-17 15:26:46 +02:00
Carlo Cabrera
69c16739d2
fetch: remove use of args from CLI parser
See discussion at #15382.
2023-05-09 18:07:32 +08:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Markus Reiter
66d80cb114
Allow running audit for different architecture. 2023-04-12 21:46:48 +02:00
Markus Reiter
5e52d415a9
Allow fetching for different arch. 2023-03-25 11:56:09 +01:00
Issy Long
e9d994622e
rubocop: Drop "f" from Naming/MethodParameterName allowlist
- This either stands for "file" but more often than not "formula".
2023-03-11 00:17:27 +00:00
Issy Long
e273c25be0
rubocop: Drop "p" from Naming/MethodParameterName allowlist
- It's used to refer to a patch, so use the long name.
2023-03-08 14:42:56 +00:00
Issy Long
0cd616bc66
rubocop: Drop "r" from Naming/MethodParameterName allowlist
- This stands for "resource" in our case, so use the long name.
2023-03-08 14:42:55 +00:00
Douglas Eichelberger
d56e2884aa Enable typing in cmd/ 2023-03-06 15:01:08 -08:00
Douglas Eichelberger
0eccc0e987 git grep -l Utils::Inflection | xargs gsed -i 's|Utils::Inflection|Utils|g' 2023-02-27 20:18:27 -08:00
Douglas Eichelberger
eb2b990575 Port more call sites 2023-02-27 20:17:33 -08:00
Carlo Cabrera
708935d2c8
cmd/fetch: rename fetch_failed to fetch_tries.
This makes the code substantially easier to understand. Follow-up to #13807.
2022-09-06 18:35:34 +08:00
Carlo Cabrera
360052af57
cmd/fetch: --retry with exponential backoff.
See discussion at Homebrew/homebrew-test-bot#826.
2022-09-06 01:25:34 +08:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00
Rylan Polster
4310674776
Require an argument to --bottle-tag in fetch and --cache 2022-06-28 11:20:22 -04:00
Rylan Polster
cff0122fc4
Remove unnecessary HOMEBREW_INSTALL_FROM_API checks 2022-06-15 16:35:50 -04:00
Rylan Polster
dda9f75fca
fetch: only fetch runtime deps with HOMEBREW_INSTALL_FROM_API 2022-04-06 23:36:24 -04:00
Steve Hahn
f5696efc16 set prefer_loading_from_api for fetch 2022-04-05 10:09:52 -07:00
Bo Anderson
59dc0ed652
formula_installer: fix error if a compatible bottle was not found 2021-09-20 20:57:39 +01:00
Dawid Dziurla
793371a348
fetch: add --bottle-tag flag 2021-07-13 18:03:04 +02:00
Mike McQuaid
262f964f9e
Fix brew fetch --force for GitHub Packages bottle tab download.
Have to implement some custom logic here as there's two resources rather
than one.
2021-04-02 12:44:07 +01:00
Mike McQuaid
d9032ff01a
Download and use tabs from GitHub Packages 2021-04-01 17:37:16 +01:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
2ae4f11963 reorder command flags 2021-01-26 15:36:44 -05:00
EricFromCanada
f5e1557154 use ofail to set Homebrew.failed 2021-01-26 15:36:43 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
332372469f
cmd: indicate multiple named args in usage banner 2021-01-15 13:04:00 +01:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Michka Popoff
5e91802470 checksum: simplify, use only sha256
We use only one sha type right now.

Needed for https://github.com/Homebrew/brew/pull/10186
2021-01-07 20:46:13 +01:00
souleater7
e50e3e4b22 Delete references to devel 2021-01-01 10:16:31 -08:00
hyuraku
0a97cd18a5 set default args 2020-12-17 21:14:18 +09:00
hyuraku
7be216fcbe change function name 2020-12-17 21:07:43 +09:00
hyuraku
d7f9bb6247 add function to define path 2020-12-17 21:07:43 +09:00
Markus Reiter
1bfd2ac0e2 Fix wrong force keyword. 2020-12-02 12:28:36 +01:00
Markus Reiter
7a83f34dd1 Support casks in brew fetch. 2020-11-19 19:46:59 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00