Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use --json=v2 for listing macOS brew casks #59439

Merged

Conversation

cdalvaro
Copy link
Contributor

@cdalvaro cdalvaro commented Feb 5, 2021

What does this PR do?

It simplifies and improves support for listing macOS brew casks.

Since Homebrew 2.6.0 (Homebrew/brew#8899), all brew cask commands have been deprecated in favour of brew commands (with --cask) when necessary. So now, any cask from official taps can be installed/removed without specifying its corresponding tap.

For example:

visual-studio-code:
  pkg.installed

can be used for installing VS Code instead of using:

homebrew/cask/visual-studio-code:
  pkg.installed

This PR also adds support for listing casks upgrades (mac_brew.list_upgrades(include_casks=True)) and getting casks info (mac_brew.info_installed("cask_name"))

Merge requirements satisfied?

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

This PR closes #24653

@cdalvaro cdalvaro force-pushed the feature/brew_pkg_use_jsonv2_for_casks branch 4 times, most recently from 293dc93 to b5be220 Compare February 7, 2021 09:00
@cdalvaro cdalvaro marked this pull request as ready for review February 8, 2021 18:17
@cdalvaro cdalvaro requested a review from a team as a code owner February 8, 2021 18:17
@cdalvaro cdalvaro requested review from twangboy and removed request for a team February 8, 2021 18:17
@cdalvaro cdalvaro force-pushed the feature/brew_pkg_use_jsonv2_for_casks branch 3 times, most recently from 64f34d8 to d8a0f59 Compare February 17, 2021 17:41
@cdalvaro
Copy link
Contributor Author

Please @twangboy, tell me if something is wrong with this issue. I created it more than 1 month ago and no one has commented or approved it.

@cdalvaro cdalvaro force-pushed the feature/brew_pkg_use_jsonv2_for_casks branch from 2bf709b to 91a8cb6 Compare March 20, 2022 17:00
@cdalvaro
Copy link
Contributor Author

Please @twangboy, tell me if something is wrong with this issue. I created it more than 1 year ago and no one has commented or approved it.

@cdalvaro
Copy link
Contributor Author

cdalvaro commented Apr 29, 2022

Excuse me for adding you to this PR @weswhet, but this PR has been open for over a year and no one has approved it or asked for changes.

Could you review it, please?

@weswhet
Copy link
Contributor

weswhet commented Apr 29, 2022

Hey, @cdalvaro can you bring it up to date with master? otherwise it looks good to me. @garethgreenaway @s0undt3ch could you have a look at this since I don't have permission to approve it.

@cdalvaro
Copy link
Contributor Author

Done! Many thanks @weswhet for reviewing it!

s0undt3ch
s0undt3ch previously approved these changes May 23, 2022
@s0undt3ch
Copy link
Collaborator

This PR needs to be rebased due to conflicts.

Could you take care of it @cdalvaro please?

@cdalvaro cdalvaro force-pushed the feature/brew_pkg_use_jsonv2_for_casks branch from f54feb3 to 88ba615 Compare May 23, 2022 11:32
@cdalvaro cdalvaro changed the title Use --json=v2 for listing macOS brew casks Draft: Use --json=v2 for listing macOS brew casks May 23, 2022
@cdalvaro cdalvaro changed the title Draft: Use --json=v2 for listing macOS brew casks 🚧 Use --json=v2 for listing macOS brew casks May 23, 2022
@cdalvaro
Copy link
Contributor Author

Due to some directory changes for the file test_mac_brew_pkg.py I think I have lost some tests.

I'm working on recovering them...

@cdalvaro cdalvaro force-pushed the feature/brew_pkg_use_jsonv2_for_casks branch from 88ba615 to 9f14383 Compare May 23, 2022 12:11
@cdalvaro
Copy link
Contributor Author

cdalvaro commented May 23, 2022

I think I have recovered all of them ... Tests will fail if I have forgotten something 🤞

@cdalvaro cdalvaro changed the title 🚧 Use --json=v2 for listing macOS brew casks Use --json=v2 for listing macOS brew casks May 23, 2022
@cdalvaro
Copy link
Contributor Author

Done! I think that CI failures are not related with my changes

@cdalvaro
Copy link
Contributor Author

Could this PR be merged for the next salt release, please?

@cdalvaro
Copy link
Contributor Author

cdalvaro commented Sep 1, 2022

1.5 years since this PR was created

@cdalvaro cdalvaro force-pushed the feature/brew_pkg_use_jsonv2_for_casks branch from fd0338c to 7248f8e Compare September 2, 2022 05:12
@cdalvaro
Copy link
Contributor Author

cdalvaro commented Sep 2, 2022

Please @Ch3LL, could you review this PR?

@cdalvaro cdalvaro force-pushed the feature/brew_pkg_use_jsonv2_for_casks branch from 7248f8e to 4339111 Compare September 3, 2022 08:07
@Ch3LL Ch3LL added the Sulfur v3006.0 release code name and version label Sep 21, 2022
@cdalvaro
Copy link
Contributor Author

Thanks @Ch3LL !!

@Ch3LL Ch3LL merged commit 3b2519e into saltstack:master Sep 22, 2022
@cdalvaro cdalvaro deleted the feature/brew_pkg_use_jsonv2_for_casks branch October 1, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sulfur v3006.0 release code name and version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Support for homebrew cask
4 participants