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
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
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