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

bump-cask-pr: add arch-specific version support #15725

Merged
merged 2 commits into from
Jul 25, 2023

Conversation

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

I am splitting #15611 into separate PRs. The current PR should be mergeable by itself. Once done, I will open a PR for the bump command.

This pull request introduces significant updates to bump-cask-pr.rb as well as new class VersionParser.

Changes:

  • bump-cask-pr has been refactored.
  • bump-cask-pr should now accept --version-intel and --version-arm.
  • cask/cask.rbi has been sorted and on_system_blocks_exist? was added.
  • Additional tests added for bump-cask-pr.
  • Typechecking added for all relevant methods.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks, looking good so far, much easier to review!

# Class handling architecture-specific version information.
#
# @api private
class VersionParser
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
class VersionParser
class Homebrew::BumpVersionParser

or similar. Feels like it should be:

  • in Homebrew module
  • reference Bump in the name

Also, don't put it in extend as it's not extending an existing class


describe "brew bump-cask-pr" do
it_behaves_like "parseable arguments"

describe Homebrew::VersionParser do
Copy link
Member

Choose a reason for hiding this comment

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

Move this to its own test file

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Looks good, thanks again @razvanazamfirei!

@MikeMcQuaid MikeMcQuaid merged commit 4b9c031 into Homebrew:master Jul 25, 2023
@razvanazamfirei razvanazamfirei deleted the bump-cask-pr-arch branch July 25, 2023 15:07
@github-actions github-actions bot added the outdated PR was locked due to age label Aug 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants