excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / shotcut.rb
blob7e65fbc3660e515e8b7400bbe3d589c6910b0b26
1 cask "shotcut" do
2   version "24.11.17"
3   sha256 "26f16cc70d1eff6d10e79604df89edde7d69602659fc2ba5293d21e1024f5d67"
5   url "https://github.com/mltframework/shotcut/releases/download/v#{version.csv.first}/shotcut-macos-#{version.csv.second || version.csv.first.no_dots}.dmg",
6       verified: "github.com/mltframework/shotcut/"
7   name "Shotcut"
8   desc "Video editor"
9   homepage "https://www.shotcut.org/"
11   # The tag version can differ from the filename version, so we include both in
12   # the `version` when necessary.
13   livecheck do
14     url :url
15     regex(%r{/v?(\d+(?:\.\d+)+)/shotcut[._-]macos[._-]v?(\d+(?:\.\d+)*)\.dmg$}i)
16     strategy :github_latest do |json, regex|
17       json["assets"]&.map do |asset|
18         match = asset["browser_download_url"]&.match(regex)
19         next if match.blank?
21         next match[1] if match[1].tr(".", "") == match[2].tr(".", "")
23         "#{match[1]},#{match[2]}"
24       end
25     end
26   end
28   depends_on macos: ">= :big_sur"
30   app "Shotcut.app"
32   zap trash: [
33     "~/Library/Application Support/Meltytech",
34     "~/Library/Caches/Meltytech",
35     "~/Library/Preferences/com.meltytech.Shotcut.plist",
36   ]
37 end