mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
39 lines
1.4 KiB
Ruby
39 lines
1.4 KiB
Ruby
cask "zspace" do
|
|
arch arm: "arm64", intel: "x64"
|
|
folder = on_arch_conditional arm: "ARM"
|
|
|
|
on_arm do
|
|
version "2.4.2023103101,1698832051,103117"
|
|
sha256 "0abb05dae245f407ac22a5ef418dad1264337f65ace2cdb4fd96288c104b0d77"
|
|
end
|
|
on_intel do
|
|
version "2.4.2023103101,1698826718,103119"
|
|
sha256 "593722da665e852d3da06c1a255a8ec12838c7ed5230612833eb1ae43248e76d"
|
|
end
|
|
|
|
url "https://update.zenithspace.net/app/APP_ZSPACE_DESKTOP_MAC#{folder}/V#{version.csv.first}/zspace/#{version.csv.second}/zspace_mac_#{arch}_#{version.csv.first}_#{version.csv.third}.dmg",
|
|
verified: "update.zenithspace.net/app/"
|
|
name "zspace"
|
|
name "极空间"
|
|
desc "NAS Client"
|
|
homepage "https://www.zspace.cn/"
|
|
|
|
livecheck do
|
|
url "https://upgrade.zenithspace.net/upgrade_server/v2/check_upgrade?app_id=APP_ZSPACE_DESKTOP_MAC#{folder}&app_version=V0.0.0&nas_id=&plat=app&channel=zspace&skip_app_sync_upgrade=1"
|
|
regex(%r{v?(\d+(?:\.\d+)+)/zspace/(\d+)/zspace[._-]mac[._-]#{arch}[._-](?:\d+(?:\.\d+)+)[._-](\d+)\.dmg}i)
|
|
strategy :json do |json, regex|
|
|
json["data"]["download_url"]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]},#{match[2]}" }
|
|
end
|
|
end
|
|
|
|
auto_updates true
|
|
|
|
app "极空间.app"
|
|
|
|
zap trash: [
|
|
"~/Library/Application Support/zspace",
|
|
"~/Library/Logs/zspace",
|
|
"~/Library/Preferences/com.zentraedi.zspaceMacApp.plist",
|
|
]
|
|
end
|