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

cask/audit: support on_os blocks in audit_min_os #17548

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

EricFromCanada
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

As suggested in Homebrew/homebrew-cask#176710, this PR does the following:

  • to MacOSRequirement, adds and tests minimum_version to return the minimum OS version allowed by a depends_on macos: stanza
  • to OnSystem, adds @on_system_block_min_os which is made available via cask/dsl.rb for fetching the minimum OS version of the current system-specific block
  • in Cask::Audit#audit_min_os:
    • checks the detected minimum supported OS version of the artifact against the minimum OS version of either the current system-specific block if present or the depends_on stanza (and adjust the associated error message to match)
    • fixes a potential issue when checking a cask specifying a depends_on array of allowed OS versions by calling minimum_version instead of version

This should help us notice when a cask version bump introduces a new minimum OS requirement.

Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@EricFromCanada EricFromCanada merged commit 347529b into master Jun 24, 2024
25 checks passed
@EricFromCanada EricFromCanada deleted the audit_min_os-fixes branch June 24, 2024 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants