excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / shadow-bot.rb
blobaaa0bb94d6e2a55d77f4310b55b0ebe872fba62c
1 cask "shadow-bot" do
2   arch arm: "-arm64"
3   livecheck_query = on_arch_conditional arm: "arm64", intel: "intel"
5   version "1.9.7"
6   sha256 arm:   "1f376878a3c16f080f42f77edee8b9c6a3cb5f52ca4aafdc0797537b339186ab",
7          intel: "f24359d0fe7abd6a00c883fbd3eb11dece09b95d7ad50525301a42f90b15c18f"
9   url "https://winrobot-pub-a-cos.yingdao.com/client/install/ShadowBot-#{version}#{arch}.dmg"
10   name "Shadow Bot"
11   name "影刀"
12   desc "Application for robotic process automation"
13   homepage "https://www.yingdao.com/"
15   livecheck do
16     url "https://api.yingdao.com/api/v1/sys/download/client?os=mac&arch=#{livecheck_query}"
17     regex(/ShadowBot[._-]v?(\d+(?:\.\d+)+)#{arch}\.dmg/i)
18     strategy :json do |json, regex|
19       match = json["data"]&.match(regex)
20       next if match.blank?
22       match[1]
23     end
24   end
26   depends_on macos: ">= :high_sierra"
28   app "影刀.app"
30   zap trash: [
31     "~/Library/Application Support/影刀",
32     "~/Library/Preferences/com.yingdao.yd.plist",
33     "~/Library/Saved Application State/com.yingdao.yd.savedState",
34   ]
35 end