cask "elgato-stream-deck" do version "6.3.1.18954" sha256 "eceb607ffc8de7c018c98ef0bc49c4f2bec70afcc6d209f15420e4581fdd740b" url "https://edge.elgato.com/egc/macos/sd/Stream_Deck_#{version}.pkg" name "Elgato Stream Deck" desc "Assign keys, and then decorate and label them" homepage "https://www.elgato.com/ww/en/s/downloads" livecheck do url "https://www.elgato.com/graphql?query=query%20contentJson(%24identifier%3A%5BString%5D%24contentType%3AString%24options%3AContentJsonOptionsInput)%7BcontentJson(identifiers%3A%24identifier%20contentType%3A%24contentType%20options%3A%24options)%7Bidentifier%20entries%7D%7D&operationName=contentJson&variables=%7B%22contentType%22%3A%22downloads%22%2C%22identifier%22%3A%5B%22downloads%22%5D%2C%22options%22%3A%7B%22level%22%3A1%7D%7D&locale=en-US" regex(/Stream[._-]Deck[._-]v?(\d+(?:\.\d+)+)\.pkg/i) end auto_updates true depends_on macos: ">= :high_sierra" pkg "Stream_Deck_#{version}.pkg" uninstall delete: "/Applications/Elgato Stream Deck.app", launchctl: "com.elgato.StreamDeck", quit: "com.elgato.StreamDeck", pkgutil: "com.elgato.StreamDeck" zap trash: [ "~/Library/Application Support/com.elgato.StreamDeck", "~/Library/Caches/com.elgato.StreamDeck", "~/Library/Caches/com.plausiblelabs.crashreporter.data/com.elgato.StreamDeck", "~/Library/Preferences/com.elgato.StreamDeck.plist", ] end