Skip to content

Commit

Permalink
miniconda: update livecheck
Browse files Browse the repository at this point in the history
The existing `livecheck` block for `miniconda` contains a `#strategy`
call but it doesn't specify a strategy symbol. We expect the symbol to
always be provided when `#strategy` is used but we enforce this using
a RuboCop and the `livecheck` block RuboCops don't apply to casks yet
(I'm currently working on this).

This adds the missing `#strategy` symbol and renames the `strategy`
block argument to use the standard `page` name for `PageMatch`.
  • Loading branch information
samford committed Oct 30, 2024
1 parent 5977358 commit e7d4988
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Casks/m/miniconda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

livecheck do
url "https://repo.anaconda.com/miniconda/"
strategy do |content|
sha256 = content.scan(/>Miniconda3-latest-MacOSX-#{arch}\.sh<.{,99}>(\w{64})</im).first.first
content.scan(/>Miniconda3-(py\d+_[\d.-]+)-MacOSX-#{arch}\.sh<.{,99}>#{sha256}</im).first.first
strategy :page_match do |page|
sha256 = page.scan(/>Miniconda3-latest-MacOSX-#{arch}\.sh<.{,99}>(\w{64})</im).first.first
page.scan(/>Miniconda3-(py\d+_[\d.-]+)-MacOSX-#{arch}\.sh<.{,99}>#{sha256}</im).first.first
end
end

Expand Down

0 comments on commit e7d4988

Please sign in to comment.