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

livecheck: allow query parameter in electron_builder strategy url #11785

Merged

Conversation

bevanjkay
Copy link
Member

This change allows a query parameter to be passed to a URL to a livecheck block using the electron_builder strategy.

This allows the livecheck in Homebrew/homebrew-cask#109152 to return the correct version, as a query parameter of noCache=true or similar needs to be passed to consistently return the latest version.

There may be a better regex to allow the query parameter in the URL.


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

@bevanjkay bevanjkay requested a review from samford July 28, 2021 01:52
@BrewTestBot
Copy link
Member

Review period will end on 2021-07-29 at 01:52:16 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Jul 28, 2021
Copy link
Member

@samford samford left a comment

Choose a reason for hiding this comment

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

I did comparative livecheck runs across the casks using ElectronBuilder with/without these changes and the output remained the same (i.e., no unwanted side effects observed).

Additionally, testing this using brew irb works as expected on the URL in Homebrew/homebrew-cask#109152:

irb(main):001:0> Homebrew::Livecheck::Strategy::ElectronBuilder.match?("https://publish.u-tools.cn/version2/latest-mac.yml?noCache=true")
=> true

It probably wouldn't hurt to squash this into one commit but this looks good to me at this point 👍

Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
@bevanjkay bevanjkay force-pushed the livecheck-electronbuilder-allowquery branch from 45c8399 to c28db04 Compare July 28, 2021 03:20
@BrewTestBot
Copy link
Member

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Jul 29, 2021
@samford samford merged commit 689c1fd into Homebrew:master Jul 29, 2021
@github-actions github-actions bot added the outdated PR was locked due to age label Aug 29, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2021
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