Merge pull request #194004 from Homebrew/bump-binance-1.54.4
[Homebrew/homebrew-cask.git] / Casks / m / manuskript.rb
blob61eaf9d876ea6cc4c283fc626779cfa26ee16541
1 cask "manuskript" do
2   version "0.16.1"
3   sha256 "f67f3f44fee26259c04eb2df24b7a85b71c9963be1fe93d5c24e738af4a2d2af"
5   url "https://github.com/olivierkes/manuskript/releases/download/#{version.major_minor_patch}/manuskript-#{version}-osx.dmg",
6       verified: "github.com/olivierkes/manuskript/"
7   name "Manuskript"
8   desc "Tool for writers"
9   homepage "https://www.theologeek.ch/manuskript/"
11   # Not every GitHub release provides a file for macOS, so we check multiple
12   # recent releases instead of only the "latest" release.
13   livecheck do
14     url :url
15     regex(/^manuskript[._-]v?(\d+(?:\.\d+)+)[._-]osx\.(?:dmg|pkg|zip)$/i)
16     strategy :github_releases do |json, regex|
17       json.map do |release|
18         next if release["draft"] || release["prerelease"]
20         release["assets"]&.map do |asset|
21           match = asset["name"]&.match(regex)
22           next if match.blank?
24           match[1]
25         end
26       end.flatten
27     end
28   end
30   app "manuskript.app"
32   zap trash: [
33     "~/Library/Application Support/manuskript",
34     "~/Library/Preferences/ch.theologeek.www.manuskript.plist",
35     "~/Library/Preferences/com.manuskript.manuskript.plist",
36     "~/Library/Saved Application State/ch.theologeek.manuskript.savedState",
37   ]
39   caveats do
40     requires_rosetta
41   end
42 end