1 cask "kekaexternalhelper" do
3 sha256 "6857bb22694b6f6c01a13c40953b0a04b1704acf90da414a7476be63961d9827"
5 url "https://github.com/aonez/Keka/releases/download/v#{version.csv.second}/KekaExternalHelper-v#{version.csv.first}.zip"
6 name "Keka External Helper"
8 desc "Helper application for the Keka file archiver"
9 homepage "https://github.com/aonez/Keka/wiki/Default-application"
11 # We can identify the version from the `location` header of the first
12 # response from https://d.keka.io/helper/ but we need to be able to either not
13 # follow redirections (i.e., omit `--location` from curl args) or iterate
14 # through the headers for all responses (not the hash of merged headers,
15 # where only the last `location` header is available).
18 regex(%r{/v?(\d+(?:\.\d+)+)/KekaExternalHelper[._-]v?(\d+(?:\.\d+)+)\.zip$}i)
19 strategy :github_releases do |json, regex|
21 next if release["draft"] || release["prerelease"]
23 release["assets"]&.map do |asset|
24 match = asset["browser_download_url"]&.match(regex)
27 "#{match[2]},#{match[1]}"
33 app "KekaExternalHelper.app"
36 "~/Library/Containers/com.aone.keka",
37 "~/Library/Saved Application State/com.aone.KekaExternalHelper.savedState",