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

iexplorer: fix livecheck #198238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Casks/i/iexplorer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
homepage "https://macroplant.com/iexplorer"

livecheck do
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
livecheck do
# The response format of this URL seems to randomly switch between a plain
# text changelog and a Sparkle appcast XML file. This matches the version
# from dmg URLs in the text, which should work in either format.
livecheck do

We should leave an explanatory comment here, as someone may try to switch this back to the Sparkle strategy otherwise.

url "https://macroplant.com/iexplorer/mac/v#{version.csv.first.major}/appcast"
url "https://macroplant.com/iexplorer/appcast"
regex(%r{/(\d+)/iExplorer[._-]v?(\d+(?:\.\d+)+)\.dmg}i)
strategy :sparkle do |item, regex|
match = item.url.match(regex)
strategy :page_match do |page, regex|
match = page.match(regex)
next if match.blank?

"#{item.version},#{match[1]}"
"#{match[2]},#{match[1]}"
end
end

Expand Down
Loading