2034 Commits

Author SHA1 Message Date
Mike McQuaid
f280ce069b
Support loading formulae/casks from subdirectories
Previously, we required all formulae and casks to be in a specific
formula or cask directory but did not check any subdirectories.

This commit allows using subdirectories for official taps, the only
ones likely to be big enough to warrant sharding in this way and to
avoid potentially breaking backwards compatibility for existing taps.

This was inspired by the most recent issues with homebrew-cask.
2023-02-24 10:57:41 +00:00
Mike McQuaid
d7029e95cd
Merge pull request #14769 from dduugg/enable-types
Enable typing in Cask::Artifact
2023-02-23 18:02:44 +00:00
Bo Anderson
336c2c792d
Merge pull request #14733 from Bo98/api-security
Security enhancements to API
2023-02-22 23:10:37 +00:00
Bo Anderson
e663f532a6
Checksum Ruby source file downloads 2023-02-22 22:50:24 +00:00
Bevan Kay
7497f805ba
Revert "cask: audit for correct signing of pkg installers" 2023-02-23 09:12:24 +11:00
Sean Molenaar
2b1fbaa26d
Merge pull request #14748 from SMillerDev/feat/cask/audit_short_version_sparkle
cask: audit if sparkle livecheck needs multipart version
2023-02-22 20:23:17 +01:00
Sean Molenaar
c14b7917a2
Update Library/Homebrew/cask/audit.rb 2023-02-22 19:43:02 +01:00
Douglas Eichelberger
29c6baeed1 Enable typing in Cask::Artifact 2023-02-22 09:11:29 -08:00
Sean Molenaar
dcb6522604
audit: fix appcast_unneeded_long_version syntax 2023-02-22 12:02:25 +01:00
Sean Molenaar
77fc4c2f8a
audit: check if third version exists before checking URL 2023-02-22 11:58:19 +01:00
Sean Molenaar
4dcf5f0ad7
cask: audit style fixes
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-21 19:29:05 +01:00
Sean Molenaar
8806178cf3
cask: audit if sparkle livecheck needs multipart version 2023-02-21 19:27:07 +01:00
Sean Molenaar
c5786ea799
cask: audit for correct signing of pkg installers 2023-02-21 17:05:55 +01:00
Mike McQuaid
d292dbdc2b
Revert "Fix permissions before moving extracted files." 2023-02-20 17:20:57 +00:00
Mike McQuaid
7f1a0936e5
Merge pull request #14702 from issyl0/greedy-short-g
cmd/(outdated,upgrade): Document `-g` as a shorter `--greedy` for Casks
2023-02-20 09:54:18 +00:00
Markus Reiter
7c5b6fd10d
Add signatures for extraction methods. 2023-02-19 19:29:21 +01:00
Issy Long
44b0050b94
cmd/(outdated,upgrade): Document -g as a shorter --greedy for Casks
- Fixes https://github.com/Homebrew/brew/issues/ 14682.
2023-02-18 18:47:49 +00:00
Sean Molenaar
50e9247da4
fix: add better keys and fuller values to influxDB analytics 2023-02-15 14:12:05 +01:00
Mike McQuaid
08c6b4556d
Merge pull request #14616 from reitermarkus/audit-cask-version
Add audit for versions containing colons or slashes.
2023-02-15 11:59:59 +00:00
Bo Anderson
7ef0c48362
Fix analytics handling when core/cask taps are untapped 2023-02-15 05:31:08 +00:00
Mike McQuaid
1d61b219db
cask/cask: fix non-absolute home error.
Needs a leading slash to avoid `File.expand.path` complaining about non-absolute home.
2023-02-14 17:22:18 +00:00
Mike McQuaid
237eec8ef8
Overhaul Formula/Cask JSON generation
- Use constants for placeholders
- Monkeypatch to set `HOMEBREW_PREFIX` consistently to placeholder
- Use environment variable to set `Dir.home` consistently to placeholder
- Use `appdir` short-circuit to set `Cask#appdir` consistently to placeholder
- Use `Cask.generating_hash!` to enable "generating mode" with these patches
- Fix `Formula#caveats` from JSON

Fixes #14505
Fixes #14595
2023-02-14 14:19:40 +00:00
apainintheneck
39c6f7d6fb Stop including *flight block source in cask API
Originally we were going to try and load the *flight blocks from the API
but we ended up going with downloading the caskfile for the subset of
casks that need this functionality for consisty's sake.

This reverts the following commits from most recent to oldest:
- ffc74a51fb32b66a4cd8bc41dbd076dd23d9100e
- e5616e94fe42505434c330be35eeafef2739944f
- d1490c3d5c087d00f2bca1787cce331202b195c5
- 7ca5a5d9a71a73f21bbb8555a38048f027bee89b
- 2d5d132713d0701d02d5ff33e9918812d13d2a83

It also changes how *flight blocks are handled in `.to_h`.
Essentially, when *flight blocks exist they are just included
as a hash of the artifact to nil to indicate that they exist.

More information isn't necessary since we don't evaluate
the current source code in the *flight artifacts that
we get from the API.
2023-02-13 21:22:18 -08:00
Markus Reiter
cd18703582
Add audit for versions containing colons or slashes. 2023-02-14 02:08:56 +01:00
Mike McQuaid
2a417f1416
Merge pull request #14609 from Bo98/json-fix
Fix `brew info --json` regressions around install status
2023-02-13 15:02:26 +00:00
Bo Anderson
cc956d73aa
Fix brew info --json regressions around install status 2023-02-13 05:07:40 +00:00
Bo Anderson
526871896c
cask: replace Caskroom in API for relocated artifacts 2023-02-13 04:33:53 +00:00
Mike McQuaid
602972e4d0
Merge pull request #14587 from Rylan12/info-json-api 2023-02-12 13:41:20 +00:00
Rylan Polster
f7fa5937d8
Allow brew info --json=v2 without taps with JSON API 2023-02-12 12:03:40 +00:00
apainintheneck
6914c310c7 extend/os: remove cask install code
This code is unnecessary since `--formula` is passed
by default to the install command on Linux making it
impossible to reach `Cask::Cmd::Install.install_casks`
since it is surrounded by `if casks.any?; end`.
2023-02-09 17:35:02 -08:00
Mike McQuaid
cb1872e5bf
Merge pull request #14553 from MikeMcQuaid/4.0.0-changes 2023-02-08 11:05:08 +00:00
Mike McQuaid
342d40e88d
Merge pull request #14510 from reitermarkus/audit-only-except
Pass `only` and `except` to cask audits.
2023-02-08 09:05:00 +01:00
Markus Reiter
b821a00bc5
Pass only and except to cask audits. 2023-02-08 08:38:32 +01: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
932d2cf3b7
Merge pull request #14548 from Homebrew/revert-14382-deprecate-disable-remove
Revert "Add deprecations and disables"
2023-02-07 19:11:26 +01:00
Mike McQuaid
6882ac17e7
Revert "Add deprecations and disables" 2023-02-07 15:13:19 +01:00
hyuraku
8daca925f1 remove #TODO 2023-02-07 22:56:04 +09:00
hyuraku
c066e940c4 apply extend/os to Cask::cmd::install#install_casks 2023-02-07 22:54:06 +09:00
Mike McQuaid
1a0f62c5dc
Merge pull request #14522 from Rylan12/api-load-booleans
Properly load booleans from the API
2023-02-06 16:06:15 +01:00
Rylan Polster
48f4769155
Properly load booleans from the API 2023-02-06 15:07:28 +01:00
apainintheneck
36ca7c95e5 Adds logging to cask loader
- extend Context to get `debug?` method
- create FromDefaultTapPathLoader to handle
  expected loading option
- log cask loader used when --debug
2023-02-05 13:36:26 -08:00
Mike McQuaid
c1b96e7199
Merge pull request #14382 from MikeMcQuaid/deprecate-disable-remove
Add deprecations and disables
2023-02-05 17:56:58 +01:00
Rylan Polster
cfde9b82ac
Merge pull request #14509 from Rylan12/missing-caskfile
Add error message with instructions for the missing cask file
2023-02-05 16:35:10 +01:00
Rylan Polster
dde44ed37c
Clarify cause of the bug in messaging
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-05 16:10:22 +01:00
Rylan Polster
0229196ac5
Merge pull request #14503 from Rylan12/artifact-json-fix
Don't convert boolean and blank values to strings in cask artifacts API
2023-02-05 15:40:14 +01:00
Rylan Polster
0fd1be9a8e
Add error message with instructions for the missing cask file 2023-02-05 15:35:11 +01:00
Rylan Polster
7b550ad8c6
Improve style
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-05 13:06:05 +01:00
Rylan Polster
7dbc33a0df
Cleanup case handling
Co-authored-by: Kevin <apainintheneck@gmail.com>
2023-02-05 12:42:31 +01:00
Rylan Polster
5ab7f14d2b
Fix cask not found error when upgrading certain casks 2023-02-05 12:26:22 +01:00
Rylan Polster
a166be9541
Don't convert boolean and blank values to strings in cask artifacts API 2023-02-05 02:58:03 +01:00