bathyscaphe: add livecheck (#96177)

This commit is contained in:
Markus Reiter 2020-12-21 18:59:08 +01:00 committed by GitHub
parent 454fee6fd0
commit fa65a28d5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

View File

@ -1,13 +1,21 @@
cask "bathyscaphe" do
version "310-v1089"
version "3.1.0,1089"
sha256 "32f7758d2898fd8cccd1b506c8d78bbff6733640e392eba67c95a6626377a603"
url "https://bitbucket.org/bathyscaphe/public/downloads/BathyScaphe-#{version}.dmg",
url "https://bitbucket.org/bathyscaphe/public/downloads/BathyScaphe-#{version.before_comma.no_dots}-v#{version.after_comma}.dmg",
verified: "bitbucket.org/bathyscaphe/public/downloads/"
appcast "https://bathyscaphe.bitbucket.io/appcast.xml"
name "BathyScaphe"
homepage "https://bathyscaphe.bitbucket.io/"
livecheck do
url "https://bathyscaphe.bitbucket.io/appcast.xml"
strategy :sparkle do |item|
match = item.url.match(%r{/BathyScaphe-(\d+)-v(\d+)\.dmg})
major_minor = item.short_version
"#{major_minor}.#{match[1].delete_prefix(major_minor.delete("."))},#{match[2]}"
end
end
depends_on macos: ">= :sierra"
app "BathyScaphe.app"