cask "feishu" do arch arm: "arm64", intel: "x64" on_arm do version "7.30.9,0c3cc29c" sha256 "d078105ca0a67559b1bfe2af84a4fc60ae06c128595aa6b06ebffc71fb8a4c69" end on_intel do version "7.30.9,f5a04364" sha256 "238cf4ff92d129bea633e4f9cde92cf84727ab9295cd236fbf2a6c1623a1e446" end url "https://sf3-cn.feishucdn.com/obj/ee-appcenter/#{version.csv.second}/Feishu-darwin_#{arch}-#{version.csv.first}-signed.dmg", verified: "sf3-cn.feishucdn.com/obj/ee-appcenter/" name "Feishu" desc "Project management software" homepage "https://www.feishu.cn/" livecheck do url "https://www.feishu.cn/api/downloads" regex(%r{/(\h+)/Feishu[._-]darwin[._-]#{arch}[._-]v?(\d+(?:\.\d+)+)[._-]signed\.dmg}i) strategy :page_match do |page, regex| page.scan(regex) .map { |match| "#{match[1]},#{match[0]}" } end end auto_updates true # Renamed for consistency: app name is different in the Finder and in a shell. app "Lark.app", target: "Feishu.app" zap trash: [ "~/Library/Caches/com.bytedance.lark.helper", "~/Library/Caches/com.electron.lark", "~/Library/Preferences/com.bytedance.lark.helper.plist", "~/Library/Saved Application State/com.electron.lark.savedState", ] end