2034 Commits

Author SHA1 Message Date
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
Rylan Polster
af9ba41cb0
Merge pull request #14456 from Rylan12/api-language-support
Support `languages` when installing from the API
2023-02-03 05:23:55 -05:00
Mike McQuaid
9d6713d023
Merge branch 'master' into api-language-support 2023-02-03 08:36:23 +00:00
apainintheneck
15c1930804 Remove redundant FromAPILoader attempt
After 32a0877 this logic has been changed so it's now
always covered by `FromAPILoader.can_load?`.
2023-02-02 18:43:53 -08:00
apainintheneck
2d93cbe13f Handle merge conflict 2023-02-02 18:40:13 -08:00
apainintheneck
e0ad960025 Load cask from API with fullname
This allows homebrew/cask/caskname
to work with the FromAPILoader.

Also, creates new constant to hold the
regex to validate main tap casks.
2023-01-31 19:39:10 -08:00
Mike McQuaid
90b154fdb5
Merge branch 'master' into cask_source_tweaks 2023-01-31 10:50:34 +00:00
Rylan Polster
32a0877cad
Remove CaskSource API 2023-01-28 02:15:00 -06:00
Rylan Polster
c1fdcbdd0e
Support languages when installing from the API 2023-01-28 01:42:19 -06:00
Rylan Polster
0f79b24203
Add languages to cask API 2023-01-28 01:05:54 -06:00
Mike McQuaid
fd18c7b0ac
Tweak cask-source API handling
- Use raw.githubusercontent.com to download cask source rather than
  formulae.brew.sh. This allows us to remove these files
- output the tap's current `HEAD` for both formulae and cask JSON
- use this `HEAD` for the cask-source API to get the exact file on
  raw.githubusercontent.com rather than just whatever is newest (which
  is what the previous API did)
- set the `Tap` correctly when creating a `Cask` from the API
- if the `formula.json` file exists: print its modified time include
  `brew config`
- memoize `tap.git_head` as we'll be calling it a lot in the same
  process with the same value
2023-01-26 17:36:40 +00:00
Mike McQuaid
61d6f7c4ca
cask/artifact/stage_only: allow string argument.
This is what's passed from the JSON API.
2023-01-26 11:22:18 +00:00
Mike McQuaid
b4510401bd
Merge pull request #14423 from MikeMcQuaid/cask_loader_api_gsubs
cask_loader: fixup artifacts/caveats from JSON API.
2023-01-25 15:41:56 +00:00
Mike McQuaid
ab1fbb7fa9
cask_loader: fixup artifacts/caveats from JSON API.
These are mapped to generic versions in `cask/cask.rb` so we need to map
them back for them to be correct.
2023-01-25 15:07:44 +00:00
Luca Ongaro
1fc1c82aed Fix code style and add tests 2023-01-25 00:08:15 +01:00
Luca Ongaro
f5765a73da Avoid mutating the script argument in place
Mutating the argument in place, and in particular deleting the
`:executable` entry, leads to a bug when the same code path leading to
read_script_arguments is invoked twice, like in
https://github.com/Homebrew/homebrew-cask/pull/139749

This commit makes a shallow copy of the argument, so that it can be
safely mutated in the rest of the method.
2023-01-24 23:34:47 +01:00
Alexander Regueiro
b2b7072fbe Permit multiple uninstall stanzas in casks (temp)
Longer-term solution is described [here](https://github.com/Homebrew/brew/issues/14365#issuecomment-1398214354).
2023-01-21 18:45:58 +00:00
Mike McQuaid
1588f6cc56
Merge pull request #13356 from SMillerDev/feature/influx_analytics
analytics: optionally duplicate to InfluxDB
2023-01-20 15:19:44 +00:00
Mike McQuaid
1adc2c096b
Merge pull request #14370 from Kentzo/fix-cask-lowpriv-sudo
cask: don't assume that sudo has write access to the caskroom
2023-01-20 10:57:35 +00:00
Sean Molenaar
59ebdab2b7
analytics: switch to InfluxDB for logging 2023-01-19 18:15:27 +01:00
Mike McQuaid
344d32bf7f
Merge pull request #14368 from Kentzo/fix-cask-backup
cask: fix writability check backing up an artifact
2023-01-19 09:58:03 +00:00
Ilya Kulakov
618700a95c cask: don't assume that sudo has write access to the caskroom 2023-01-13 18:10:21 -08:00
Ilya Kulakov
085bd8ddd1 cask: don't attempt to make a directory that already exists. 2023-01-13 16:15:31 -08:00
Ilya Kulakov
3d16112b14 cask: fix writability check backing up an artifact 2023-01-13 15:30:14 -08:00
Mike McQuaid
9dbd76fced
Merge pull request #14350 from Rylan12/fix-depends-on-arch
Fix `depends_on arch:` when loading casks from API
2023-01-11 19:24:55 +00:00
Rylan Polster
4c8c547027
Add clarifying comment 2023-01-11 13:16:34 -05:00
Douglas Eichelberger
9958ab3ecf Make Cask::DSL::Container#pairs a derived property 2023-01-11 09:04:09 -08:00
Rylan Polster
6468897458
Fix depends_on arch: when loading casks from API 2023-01-10 12:35:39 -05:00
Rylan Polster
3c4f60c604
Create metadata subdirectory when needed 2023-01-08 02:45:56 -05:00
Mike McQuaid
20a200bdb7
cask/installer: ensure config_path exists.
I encountered this when installing `microsoft-edge`.

Perhaps `HOMEBREW_INSTALL_FROM_API` related.
2023-01-07 19:44:44 +00:00
Rylan Polster
ec8adb617e
Use cask-source API when needed 2023-01-06 02:46:22 -05:00
Rylan Polster
ffc74a51fb
Load *flight blocks from API 2023-01-06 02:46:22 -05:00
Rylan Polster
374b61584b
Load casks from the JSON API with HOMEBREW_INSTALL_FROM_API 2023-01-06 02:46:21 -05:00
Mike McQuaid
37be5bea52
dev-cmd/edit: handle editing with install_from_api.
Before this change, this would fail every time, even when available on
disk (which was not the case for formulae).

With this change, it will attempt to find it from a tap on disk and only
fail if it cannot be found in any.
2023-01-04 13:51:21 +00:00
Rylan Polster
a81710542f
Merge pull request #14324 from Rylan12/flight-blocks-cask-api
Include `*flight` block source in cask API
2023-01-03 11:44:53 -05:00
Rylan Polster
7ca5a5d9a7
Simplify require "method_source" calls 2023-01-02 17:41:36 -05:00
Rylan Polster
2d5d132713
Include *flight block source in cask API 2023-01-02 14:33:33 -05:00
Mike McQuaid
6a25229567
brew style --fix 2023-01-02 19:18:51 +00:00
Rylan Polster
55a8c0208f
Merge pull request #14303 from Rylan12/cask-json-api-container
Use JSON instead of `#inspect` to include cask container in API
2022-12-29 14:33:52 -05:00
Mike McQuaid
5994f165f5
Merge pull request #14123 from bevanjkay/cask-wildcard-launchctl
cask/artifact/abstract_uninstall: allow wildcard entries for launchctl
2022-12-29 19:26:53 +00:00
Rylan Polster
7a85492176
Use JSON instead of #inspect to include cask container in API 2022-12-29 02:05:16 -05:00
Patrick Linnane
7b6c8329b1
Update Library/Homebrew/cask/audit.rb
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2022-12-28 21:31:02 -08:00
Patrick Linnane
ed6d7ce995
cask/audit: improve handling nil in sparkle 2022-12-28 21:17:38 -08:00
Bevan Kay
3869bf156c
change line splitting method 2022-12-29 12:54:59 +11:00
Bevan Kay
c45a32ea8d
Update Library/Homebrew/cask/audit.rb
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2022-12-28 16:32:58 +11:00
Bevan Kay
2788efb732
Update audit.rb 2022-12-28 16:26:45 +11:00
Bevan Kay
3e11f315f7
cask/audit: improve sparkle minimum version audit 2022-12-28 15:18:59 +11:00
Bevan Kay
db9d48a7ec
fix tests 2022-12-28 12:50:16 +11:00
Rylan Polster
09a2ccdf24
Improve minimum macOS version audit for casks 2022-12-27 18:14:46 -05:00
Nanda H Krishna
fe0eb9b5b0
Fix style issues 2022-12-22 23:52:26 -05:00