Merge pull request #200213 from Homebrew/bump-tidelift-1.14.0
[Homebrew/homebrew-cask.git] / Casks / s / shotcut.rb
blobc5f59ab1c109a2d9e265f4a2fb0d856edfe54d45
1 cask "shotcut" do
2   version "25.01.25"
3   sha256 "70e09514f09338558de1331077d766d79c299a3b3ad394e405d7a19e342ec8bb"
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