cask "gitbutler" do arch arm: "aarch64", intel: "x86_64" arch_suffix = on_arch_conditional arm: "aarch64", intel: "x64" version "0.13.15,1494" sha256 arm: "5fc6eacde1e440a10b3fae3e7e379378d919facffc092af34939af2841fe0281", intel: "a15868643e96f5ab042426ea6b1afa60ab516d9f0334184ebc828be8de3d45ab" url "https://releases.gitbutler.com/releases/release/#{version.csv.first}-#{version.csv.second}/macos/#{arch}/GitButler_#{version.csv.first}_#{arch_suffix}.dmg" name "GitButler" desc "Git client for simultaneous branches on top of your existing workflow" homepage "https://gitbutler.com/" livecheck do url "https://app.gitbutler.com/downloads/release/darwin/#{arch}/dmg" regex(%r{/releases/release/(\d+(?:\.\d+)+)[._-](\d+)/macos}i) strategy :header_match do |headers, regex| match = headers["location"]&.match(regex) next if match.blank? "#{match[1]},#{match[2]}" end end auto_updates true depends_on macos: ">= :high_sierra" app "GitButler.app" zap trash: [ "~/Library/Application Support/com.gitbutler.app", "~/Library/Caches/com.gitbutler.app", "~/Library/Logs/com.gitbutler.app", "~/Library/Preferences/com.gitbutler.app.plist", "~/Library/Saved Application State/com.gitbutler.app.savedState", "~/Library/WebKit/com.gitbutler.app", ] end