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

Allow tap migrations with renames. #16648

Merged
merged 5 commits into from Feb 13, 2024

Conversation

reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented Feb 13, 2024

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

This allows specifying full names in tap_migrations.json to migrate with a different name.

Also fix the old/new name in the warning messages.

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.

Code makes sense, thanks! Can you supply a small example of what this PR enables in terms of migrations and whether it's for formula/casks/both?

@reitermarkus
Copy link
Member Author

reitermarkus commented Feb 13, 2024

It enables this in tap_migrations.json:

{
  "vlc-beta": "homebrew/cask/vlc@beta"
}

We'll need it for migrating homebrew/cask-versions, but I added it for both casks and formulae.

@MikeMcQuaid
Copy link
Member

We'll need it for migrating homebrew/cask-versions, but I added it for both casks and formulae.

Very nice 👍🏻 👏🏻

@Bo98
Copy link
Member

Bo98 commented Feb 13, 2024

Does this need extra migration code in update-report etc or is that covered?

@reitermarkus
Copy link
Member Author

It should work with the existing code based on renames, since this basically only extends the list of renames.

@reitermarkus
Copy link
Member Author

I haven't checked if we need to update the tap of installed casks somewhere, but I'm not sure if we even store this information like we do for formulae.

@Bo98
Copy link
Member

Bo98 commented Feb 13, 2024

iirc we do for JSON installs but not Ruby installs

@reitermarkus
Copy link
Member Author

Yeah, so we don't have it for cask-versions. The question is do we need to install the .json during migration? Currently I think we only replace the token in the Ruby file.

@reitermarkus reitermarkus merged commit 7f369c5 into Homebrew:master Feb 13, 2024
24 checks passed
@reitermarkus reitermarkus deleted the tap-migrations-rename branch February 13, 2024 18:26
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
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.

None yet

3 participants