excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / sdm.rb
blob75207c9d0568727205291e1941f68f698cf1c2a2
1 cask "sdm" do
2   version "21.89.0,71E3C5E3B022C5787A77538DCEE7584F5AE4E7BD"
3   sha256 "5a855d034bf1981146126e66b68597c57c882d906ce9769c5f3e91b4944f7025"
5   url "https://downloads.strongdm.com/builds/desktop/#{version.csv.first}/darwin-universal/#{version.csv.second}/SDM-#{version.csv.first}.universal.zip"
6   name "sdm"
7   desc "StrongDM client"
8   homepage "https://www.strongdm.com/"
10   livecheck do
11     url "https://app.strongdm.com/releases/desktop/darwin/0.0.0"
12     regex(%r{https:.*?/(\h+)/SDM[._-]v?(\d+(?:\.\d+)+)\.universal\.zip}i)
13     strategy :page_match do |page, regex|
14       page.scan(regex).map { |match| "#{match[1]},#{match[0]}" }
15     end
16   end
18   depends_on macos: ">= :high_sierra"
20   app "SDM.app"
21   binary "#{appdir}/SDM.app/Contents/Resources/sdm.darwin", target: "sdm"
23   uninstall delete: "#{appdir}/SDM.app/Contents/Resources/sdm-socket"
25   zap trash: [
26     "/usr/local/bin/sdm",
27     "~/.sdm",
28     "~/Library/Application Support/SDM",
29     "~/Library/Caches/com.electron.sdm*",
30     "~/Library/Preferences/com.electron.sdm.plist",
31     "~/Library/Saved Application State/com.electron.sdm.savedState",
32   ]
33 end