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

Bitbucket: Fix tag match #15463

Merged
merged 1 commit into from May 22, 2023

Conversation

samford
Copy link
Member

@samford samford commented May 19, 2023

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

In some cases, the Bitbucket strategy currently matches versions from tag tarball links on a project's downloads/?tab=tags page. It appears that Bitbucket now uses a hash as the filename on this page instead of the tag name, so the existing regex no longer matches.

This adds an alternative regex to match versions from the tag name element (e.g., <td class="name">example-1.2.3</td>), which will fix version matching in this scenario.

Affected formulae are mvnvm, uru, when, and x265. All but uru are currently falling back to checking the Git tags from their head URL. With this change, the uru check works again and the others return to using the Bitbucket strategy (since it returns a version).

For what it's worth, now that Bitbucket has dropped Mercurial support, it should be technically possible to have Bitbucket use the Git strategy internally to check tags in this scenario. That may be preferable but I wanted to merge a fix in the interim time.

The `Bitbucket` strategy currently matches versions from tag
tarball links on a project's `downloads/?tab=tags` page. It appears
that Bitbucket now uses a hash as the filename on this page instead
of the tag name, so the existing regex no longer matches.

This adds an alternative regex to match versions from the tag name
element (e.g., `<td class="name">example-1.2.3</td>`), which will fix
version matching in this scenario.
@samford samford force-pushed the livecheck/fix-bitbucket-tag-match branch from 9b38506 to ba7cf9d Compare May 19, 2023 14:55
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 @samford!

@samford samford merged commit cd99f72 into Homebrew:master May 22, 2023
24 checks passed
@samford samford deleted the livecheck/fix-bitbucket-tag-match branch May 22, 2023 03:58
@github-actions github-actions bot added the outdated PR was locked due to age label Jun 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 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.

None yet

2 participants