179 Commits

Author SHA1 Message Date
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
Mike McQuaid
90b154fdb5
Merge branch 'master' into cask_source_tweaks 2023-01-31 10:50:34 +00: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
Rylan Polster
2d5d132713
Include *flight block source in cask API 2023-01-02 14:33:33 -05:00
Rylan Polster
7a85492176
Use JSON instead of #inspect to include cask container in API 2022-12-29 02:05:16 -05:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.

Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
2022-09-05 13:57:22 +01:00
Rylan Polster
5c7e7eebe4
Condense artifact entries
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-08-25 10:24:30 -04:00
Rylan Polster
90d22bc7b1
Include dsl key in cask artifact hash 2022-08-25 03:04:48 -04:00
hyuraku
acf39f8777 add TODO comment 2022-08-08 19:58:50 +09:00
hyuraku
0acadc857c repair CaskLoader.load args 2022-08-07 15:43:51 +09:00
Rylan Polster
f3e34230ad
Add --variations option to brew info 2022-07-21 16:41:15 +02:00
Rylan Polster
eab3d077bc
Improvements 2022-07-21 15:32:51 +02:00
Rylan Polster
ac067eedb2
Create MacOSVersions module 2022-06-29 11:34:49 -04:00
Rylan Polster
5ec19adf58
Rename Override module to SimulateSystem 2022-06-28 15:35:20 -04:00
Rylan Polster
d3c3f7be9e
Add variations to Cask#to_h 2022-06-24 14:39:17 -04:00
Sam Ford
d7a26cd6d3
ExtractPlist: Modify #find_versions url usage 2022-06-24 00:08:53 -04:00
Bo Anderson
e78665f4f7
Replace ENV["HOME"] with Dir.home 2022-06-17 19:47:57 +01:00
Rylan Polster
1e536217b2
Streamline loading casks from API 2022-06-15 16:35:49 -04:00
Harry Marr
aa9a07f49e
Only checksum file downloads, not VCS downloads 2022-06-12 11:24:50 -04:00
Mike McQuaid
845925bf56
Merge pull request #13311 from bevanjkay/fix-outdated-greedy
cask: fix greedy outdated command
2022-06-06 10:05:24 +01:00
apainintheneck
6f06236bca Fix :svn download errors with :latest casks 2022-06-01 09:04:54 -07:00
Bevan Kay
6b155d9328
Update Library/Homebrew/cask/cask.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-05-28 10:14:51 +10:00
Bevan Kay
ac2f52cef3
cask: fix greedy outdated command 2022-05-24 22:38:30 +10:00
apainintheneck
b85f407e95 Only upgrade :latest casks when --greedy and the cask has been updated
A sha256 hash of the previous download is stored and compared with
new downloads before updating :latest casks. This prevents unnecessary
reinstalls when the cask hasn't been updated.

Move download path to cask from installer to prevent unnecessary
redownloads of casks.
2022-05-17 16:15:05 -07:00
Mike McQuaid
3a709d36b2
Start process to remove Enumerable from Formula and Cask::Cask.
This is the first step to address
https://github.com/Homebrew/brew/issues/11292.
2022-01-03 14:59:10 +00:00
Mike McQuaid
d43555dd75
brew style --fix 2021-11-02 11:16:10 +00:00
Rylan Polster
0b8032d421
Document HOMEBREW_INSTALL_FROM_API 2021-10-22 12:37:57 -04:00
Rylan Polster
5d536d66fc
Rename HOMEBREW_JSON_CORE to HOMEBREW_INSTALL_FROM_API 2021-08-27 00:24:15 -04:00
Rylan Polster
8690d661fd
Merge pull request #11859 from Rylan12/cask-json
Allow casks to be installed using the `cask-source` API
2021-08-26 23:58:51 -04:00
Rylan Polster
c3a8b3841e
Only include differring versions
Move the resetting of `MacOS.version` to an `ensure` block.

Fix the tests by adding a test OS and new fixture that has a
different version for that test OS.
2021-08-25 10:30:38 -04:00
Rylan Polster
663cc40139
Add per-os versions to Cask::Cask#to_h 2021-08-24 11:35:19 -04:00
Rylan Polster
ea2e40c69a
Add Cask::Cask#source to return cask's source code 2021-08-14 16:18:13 -04:00
Rylan Polster
99635bf3ae
Remove need for homebrew/cask to be tapped 2021-08-14 16:17:26 -04:00
Mike McQuaid
b3dd9fb42f
Merge pull request #11629 from bevanjkay/upgrade_outdated_skipunversioned
adds an option to skip unversioned casks in outdated and upgrade command
2021-08-03 08:53:53 +01:00
Nanda H Krishna
2394a4c4fc
Rename metadata_master_container_path to metadata_main_container_path 2021-07-08 12:36:40 +05:30
Bevan Kay
322d5c67ec
Add parentheses to if statement 2021-07-06 10:11:40 +10:00
Bevan Kay
88edb1c64b
fix style 2021-07-04 17:25:03 +10:00
Bevan Kay
85082066f2
fix style 2021-07-01 23:02:15 +10:00
Bevan Kay
b1c70160f3
Split into two flags --greedy-latest and --greedy-auto-updates 2021-07-01 23:01:22 +10:00
Bevan Kay
057b3a3502
adds an option to skip unversioned casks in outdated and upgrade command 2021-06-30 11:13:21 +10:00
nandahkrishna
a0b7580dc4
Fix eql? in Cask::Cask 2021-02-17 01:18:25 +05:30
Carlos Álvaro
aebf4c9100
Safe access to tap attributes
Prevent calling name tap attribute when the tap is nil

Co-Authored-By: Rylan Polster <rslpolster@gmail.com>
2021-02-08 13:20:41 +01:00
Carlos Álvaro
84d80cf0bf
Add tap to cask json output 2021-02-08 13:20:40 +01:00
Carlos Álvaro
4f5f3824c6
Add full_token to cask json output 2021-02-08 13:20:40 +01:00
Mike McQuaid
95c6e92d9b
Merge pull request #10278 from zkokaja/add-cask-json-values
Add installed and outdated to cask json output
2021-01-25 10:04:25 +00:00
Seeker
8d24fb1367 Output string instead of array for installed cask version 2021-01-24 18:27:23 -08:00
Markus Reiter
9922ad382f Ignore invalid keys when reading existing Cask::Config. 2021-01-13 08:30:50 +01:00
Zaid Kokaja
9cf3d5a32d Add installed and outdated to cask json output 2021-01-09 22:46:27 -05:00