3 sha256 "38cfe45fd4440983d3cbf4ca1305fa977c8479a16f6696bd22742ad451fa4cd7"
6 depends_on formula: "katago"
9 url "https://github.com/sanderland/katrain/releases/download/v#{version}/KaTrainOSX.dmg"
11 desc "Tool for analyzing games and playing go with AI feedback from KataGo"
12 homepage "https://github.com/sanderland/katrain"
14 # Most recent release doesn't provide a file forr macOS, so we check multiple
15 # recent releases instead of only the "latest" release. NOTE: We should be
16 # able to remove this next release when upstream provides a file for macOS again.
19 regex(%r{/v?(\d+(?:\.\d+)+)/KaTrainOSX\.(?:dmg|pkg)$}i)
20 strategy :github_releases do |json, regex|
22 next if release["draft"] || release["prerelease"]
24 release["assets"]&.map do |asset|
25 match = asset["browser_download_url"]&.match(regex)
36 zap trash: "~/.katrain"