cask "tiger-trade" do version "8.33.3,AA2913" sha256 "a035a32da7d5af9666585a1ed20856ea98384d3cf8540301065b9a1f595bd54c" url "https://s.tigerfintech.com/desktop/cdn/f/TigerTrade_#{version.tr(",", "_")}.dmg", verified: "s.tigerfintech.com/" name "Tiger Trade" name "老虎证券" desc "Trading platform" homepage "https://www.tigerbrokers.com.sg/download/" livecheck do url "https://up.play-analytics.com/app/upgrade/latest?lang=zh_CN&platform=darwin&appVer=1" regex(/TigerTrade[._-]v?(\d+(?:\.\d+)+)[._-](\h+).dmg/i) strategy :json do |json, regex| match = json["downloadUrl"]&.match(regex) next if match.blank? "#{match[1]},#{match[2]}" end end depends_on macos: ">= :sierra" app "Tiger Trade.app" zap trash: [ "~/Library/Application Scripts/com.itiger.TigerTrade-Mac", "~/Library/Containers/com.itiger.TigerTrade-Mac", ] end