Skip to content

Commit

Permalink
simplediagrams: add livecheck (Homebrew#104247)
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Apr 19, 2021
1 parent 8fe8271 commit 6696e9c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Casks/simplediagrams.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
sha256 "07ec3148f476a7b399bb000475c0339a851ea0e9c430159a8ea3371793d2f99a"

url "https://www.simplediagrams.com/download/simplediagrams_installer_#{version.dots_to_underscores}.dmg"
appcast "https://www.simplediagrams.com/downloads",
must_contain: version.dots_to_underscores
name "SimpleDiagrams"
homepage "https://www.simplediagrams.com/"

livecheck do
url "https://www.simplediagrams.com/downloads"
strategy :page_match do |page|
v = page[%r{href=.*?/simplediagrams_installer_(\d+(?:_\d+)*)\.dmg}i, 1]
v.tr("_", ".")
end
end

app "SimpleDiagrams#{version.major}.app"
end

0 comments on commit 6696e9c

Please sign in to comment.