excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / u / ultimaker-cura.rb
blob7a6e7ff5ab1ca7e42d0142f12f5ccc8f243a5a06
1 cask "ultimaker-cura" do
2   arch arm: "ARM64", intel: "X64"
4   on_arm do
5     version "5.9.0"
6     sha256 "55ba3809a33f8e882f7a2fe608994190bcfbec6d10e53345ee2f2fabd02d80eb"
7   end
8   on_intel do
9     version "5.9.0"
10     sha256 "beeb3a32381d48fea8d5c27b737acf008b44363b7c75e16b9bed98379dc9de84"
11   end
13   url "https://github.com/Ultimaker/Cura/releases/download/#{version.csv.second || version.csv.first}/UltiMaker-Cura-#{version.csv.first}-macos-#{arch}.dmg",
14       verified: "github.com/Ultimaker/Cura/"
15   name "UltiMaker Cura"
16   name "Cura"
17   desc "3D printer and slicing GUI"
18   homepage "https://ultimaker.com/software/ultimaker-cura"
20   livecheck do
21     url :url
22     regex(/^(\d+(?:\.\d+)+)/i)
23     strategy :github_latest do |json, regex|
24       tag = json["tag_name"]&.sub(/^\D+/, "")
25       match = tag&.match(regex)
26       next if match.blank?
28       (match[1] == tag) ? match[1] : "#{match[1]},#{tag}"
29     end
30   end
32   app "UltiMaker Cura.app"
34   uninstall quit: "nl.ultimaker.cura.dmg"
36   zap trash: [
37     "~/.cura",
38     "~/Library/Application Support/cura",
39     "~/Library/Caches/Ultimaker B.V./Ultimaker-Cura",
40     "~/Library/Logs/cura",
41     "~/Library/Preferences/nl.ultimaker.cura.dmg.plist",
42     "~/Library/Preferences/nl.ultimaker.cura.plist",
43     "~/Library/Saved Application State/nl.ultimaker.cura.dmg.savedState",
44   ]
45 end