2167 Commits

Author SHA1 Message Date
Kevin
d686be67c6
Merge pull request #17761 from eaze/cask-quiet-upgrade
Add better "--quiet" support to cask upgrade
2024-07-19 22:54:51 -07:00
Bo Anderson
ec41f66ee7
cask/artifact/installer: reset UID when running scripts 2024-07-17 06:33:08 +01:00
Klaus Hipp
d90c5c55d2
cask/audit: handle cask_min_os is nil 2024-07-16 10:35:47 -04:00
Rylan Polster
86bf1eacdb
Merge pull request #17763 from Homebrew/fix-tap-git-head 2024-07-15 14:11:34 -04:00
Rylan Polster
c4dabb5527
Have tap_git_head return nil when no tap is installed 2024-07-15 13:47:21 -04:00
Eric Sampson
d40ab11784 Add "-quiet" support to cask updgrade 2024-07-15 11:50:37 -05:00
Justin Krehel
0799222df2
cask/info: fix installed size reporting 2024-07-15 11:24:38 -04:00
Mike McQuaid
c5dbd3ca24
Rearrange requires
This improves the load time of most brew commands. For an example of
one of the simplest commands this speeds up:

Without Bootsnap:
```
$ hyperfine 'git checkout master; brew help' 'git checkout optimise_requires; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     525.0 ms ±  35.8 ms    [User: 229.9 ms, System: 113.1 ms]
  Range (min … max):   465.3 ms … 576.6 ms    10 runs

Benchmark 2: git checkout optimise_requires; brew help
  Time (mean ± σ):     383.3 ms ±  25.1 ms    [User: 133.0 ms, System: 72.1 ms]
  Range (min … max):   353.0 ms … 443.6 ms    10 runs

Summary
  git checkout optimise_requires; brew help ran
    1.37 ± 0.13 times faster than git checkout master; brew help
```

With Bootsnap:
```
$ hyperfine 'git checkout master; brew help' 'git checkout optimise_requires; brew help'
Benchmark 1: git checkout master; brew help
  Time (mean ± σ):     386.0 ms ±  30.9 ms    [User: 130.2 ms, System: 93.8 ms]
  Range (min … max):   359.5 ms … 469.3 ms    10 runs

Benchmark 2: git checkout optimise_requires; brew help
  Time (mean ± σ):     330.2 ms ±  32.4 ms    [User: 93.4 ms, System: 73.0 ms]
  Range (min … max):   302.9 ms … 413.9 ms    10 runs

Summary
  git checkout optimise_requires; brew help ran
    1.17 ± 0.15 times faster than git checkout master; brew help
```
2024-07-14 08:49:39 -04:00
Rylan Polster
8b0a4a98bf
Restrict direct url installs to the file:// scheme 2024-07-13 13:30:36 -04:00
Mike McQuaid
f39b5c1426
Merge pull request #17554 from Homebrew/cask-install-receipt 2024-07-13 10:55:06 -04:00
Rylan Polster
fec84544a9
Remove arch and macos dependencies from cask tab 2024-07-10 11:25:05 -04:00
Rylan Polster
d17da89382
Include recursive dependencies in cask tabs 2024-07-09 15:25:57 -04:00
Rylan Polster
119e02ceb0
Cleanup tap_git_head and uninstall_flight_blocks?
Co-authored-by: Kevin <apainintheneck@gmail.com>
2024-07-09 13:22:00 -04:00
Bevan Kay
a77a8ca564
cask/dsl/caveats: allow for simulated system checks in rosetta caveat 2024-07-09 15:42:38 +10:00
Rylan Polster
79fd5ee2b7
Refactor tap and versions 2024-07-05 10:07:30 -04:00
Rylan Polster
e176159b23
Fix test 2024-07-04 12:27:45 -04:00
Rylan Polster
3a732460e9
Refactor Tab create method 2024-07-04 11:18:26 -04:00
Rylan Polster
673b171b10
Update commands to use cask install receipts 2024-07-04 01:47:13 -04:00
Rylan Polster
acd60181c2
Add cask install receipts 2024-07-04 01:47:13 -04:00
Rylan Polster
c16a9b33b2
Use cached json API file for formulae and cask specified paths 2024-07-03 13:41:52 -04:00
Mike McQuaid
c524e5c2fc
Merge pull request #17608 from Homebrew/audit_min_os-more-fixes 2024-07-02 09:03:49 +01:00
Eric Knibbe
3f73f32286
cask/audit: handle on_os range bounded by depends_on 2024-07-01 23:11:26 -04:00
apainintheneck
16e605e056 Load tap migration renames from API with short names
This is a follow-up to 484498e. I added loading for tap migration
renames from the API but it apparently only worked for full names.

There was a bug in both the code and the tests which prevented
loading by short names. This fixes those bugs so everything should
be good now.
2024-07-01 18:53:31 -07:00
Mike McQuaid
484498ea7c
Merge pull request #17599 from Homebrew/load-tap-migration-renames-from-api 2024-07-01 08:43:44 +01:00
Mike McQuaid
6ca46550d9
Merge pull request #17596 from Homebrew/audit_min_os-arch-specific 2024-06-30 19:32:34 +01:00
apainintheneck
10aa981209 Load tap migration renames from the API
These would not get loaded from the API at all meaning these
were not loadable by the old names when the core formula or cask
tap was not installed. We assume that most users don't have those
core taps tapped which means this is broken for most everyone.
2024-06-30 11:26:03 -07:00
Mike McQuaid
3948359aab
Merge pull request #17575 from krehel/update-audit-rosetta 2024-06-30 19:23:24 +01:00
Eric Knibbe
0d3e50d144
cask/audit: handle arch-specific detected min OS 2024-06-30 00:23:45 -04:00
Mike McQuaid
a7b2da0fc4
cask/audit: use select instead of reject.
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2024-06-28 08:33:20 +01:00
Sean Molenaar
203049b2f5 fix: improve audit for binary stanza 2024-06-28 09:28:55 +02:00
Sean Molenaar
8e570a0e9b feat: check for unknown arch for casks 2024-06-28 08:53:10 +02:00
Justin Krehel
475fc1d281
cask/audit: filter bad artifacts in rosetta audit 2024-06-27 12:25:46 -04:00
Sean Molenaar
5fc3af15c5 feat: check if casks should warn about rosetta 2024-06-27 14:22:03 +02:00
Eric Knibbe
16863f3884
cask/audit: ensure on_os blocks specify a min OS 2024-06-25 22:20:21 -04:00
Eric Knibbe
f627c6331d
cask/audit: support on_os blocks in audit_min_os 2024-06-21 19:25:51 -04:00
Eric Knibbe
1ef1b0b556
cask: ignore minimum macOS in on_os blocks for variations 2024-06-20 23:19:09 -04:00
Kevin
c3c1528611
Revert "Use cp -c when copying files" 2024-06-17 21:17:10 -07:00
Mike McQuaid
e2d01583f6
Merge pull request #17512 from samford/cask-audit-livecheck-availability-user-agents 2024-06-15 18:28:48 +01:00
Bo Anderson
fa00d2a9fd
cask: fix trash.swift under Xcode 16 2024-06-15 03:09:50 +01:00
Sam Ford
fcc87c901d
Cask::Audit: Align user agents with livecheck
The `#page_headers` and `#page_content` methods in
`Livecheck::Strategy` will fetch a URL using our default user agent
but if the request fails it will retry with the `:browser` user agent.
[For context, it was added as an interim measure to make URLs work
that require a different user agent but I aim to remove it in the
future in favor of specifying the user agent in a `livecheck` block
(so we don't make unnecessary requests that we know will fail).]

`Cask::Audit#audit_livecheck_https_availability` checks the
`livecheck` block URL but it only does so using our default user
agent (i.e., it calls `#validate_url_for_https_availability` which
calls `Utils::Curl#curl_check_http_content` which has a `user_agents:
[:default]` parameter). Due to this behavioral mismatch, it's possible
for a `livecheck` block to work but for this cask audit to fail.

This addresses the issue by adding `user_agents: [:default, :browser]`
to the arguments the audit uses, which aligns its behavior with
livecheck's.
2024-06-14 15:38:24 -04:00
Mike McQuaid
1e0add6d66
Merge pull request #17373 from tesaguri/cp-reflink 2024-06-13 08:57:20 +01:00
Daiki Mizukami
8e8d0c0248
brew style --fix 2024-06-12 12:28:42 +09:00
Daiki Mizukami
028cfe1ea6
Utils::Cp: Rename to Utils::Copy
As per review feedback:

https://github.com/Homebrew/brew/pull/17373#discussion_r1633217748
2024-06-11 20:31:34 +09:00
Kevin
f8b1d1f56c
Merge pull request #17385 from pe/migrations-broken
Fix migrations of formulae and casks to non homebrew taps
2024-06-08 19:34:14 -07:00
Daiki Mizukami
67f280eb53
Utils::Cp: Add force_system keyword argument
This fixes the test for `UnpackStrategy::Directory`, which needs the
`cp` command.
2024-06-09 07:57:56 +09:00
Philippe Eberli
20fb068085 Fix migrations of formulae and casks to non homebrew taps 2024-06-08 16:29:23 +02:00
Daiki Mizukami
b2ddeecdd9
Utils::Cp: Remove copy prefix from method name
As per review feedback:

https://github.com/Homebrew/brew/pull/17373#pullrequestreview-2104523770

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2024-06-08 07:58:20 +09:00
Daiki Mizukami
58852106c1
Utils::Cp: Rename copy* methods to copy*_with_attributes
As per review feedback:

https://github.com/Homebrew/brew/pull/17373#pullrequestreview-2103870774
2024-06-07 19:03:33 +09:00
Eric Knibbe
2d00e50071
cask: skip variations for inapplicable versions 2024-06-03 12:33:00 -04:00
Issy Long
509fffab2b
Make more files Sorbet typed: strict
- According to Spoom, these could be bumped automatically with no errors.
2024-06-02 15:15:24 +01:00