mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
40 lines
1.2 KiB
Ruby
40 lines
1.2 KiB
Ruby
cask "mixin" do
|
|
version "1.0.1"
|
|
sha256 "b5d78b0314f477da34639fece8121a11bcc08a8381f3424a732a66c0f524927d"
|
|
|
|
url "https://github.com/MixinNetwork/flutter-app/releases/download/v#{version}/mixin-#{version}.dmg"
|
|
name "Mixin Messenger Desktop"
|
|
desc "Cryptocurrency wallet"
|
|
homepage "https://github.com/MixinNetwork/flutter-app"
|
|
|
|
# Not every GitHub release provides a file for macOS, so we check multiple
|
|
# recent releases instead of only the "latest" release.
|
|
livecheck do
|
|
url :url
|
|
regex(/^mixin[._-]v?(\d+(?:\.\d+)+)\.(?:dmg|pkg|zip)$/i)
|
|
strategy :github_releases do |json, regex|
|
|
json.map do |release|
|
|
next if release["draft"] || release["prerelease"]
|
|
|
|
release["assets"]&.map do |asset|
|
|
match = asset["name"]&.match(regex)
|
|
next if match.blank?
|
|
|
|
match[1]
|
|
end
|
|
end.flatten
|
|
end
|
|
end
|
|
|
|
auto_updates true
|
|
|
|
app "Mixin.app"
|
|
|
|
zap trash: [
|
|
"~/Library/Application Scripts/one.mixin.messenger.desktop",
|
|
"~/Library/Application Support/one.mixin.messenger.desktop",
|
|
"~/Library/Containers/one.mixin.messenger.desktop",
|
|
"~/Library/Saved Application State/one.mixin.messenger.desktop.savedState",
|
|
]
|
|
end
|