cask "brewbar" do
  version "0.1"
  sha256 "5b37d2457d12ca42f61d3d95476987e965b3d56927c35be68abc91b047294a88"

  url "https://forgejo.socheleau.fr/maxsoch/BrewBar/releases/download/v#{version}/BrewBar-#{version}.zip"
  name "BrewBar"
  desc "Menu bar app to monitor and upgrade Homebrew packages"
  homepage "https://forgejo.socheleau.fr/maxsoch/BrewBar"

  depends_on macos: :ventura


  app "BrewBar.app"

  zap trash: [
    "~/Library/Application Support/BrewBar",
    "~/Library/Preferences/com.MaxSoch.BrewBar.plist",
  ]

  caveats <<~EOS
    BrewBar is not notarized. On any Mac that did not build it, clear the
    quarantine flag after install or upgrade, or Gatekeeper will block it:

      xattr -dr com.apple.quarantine /Applications/BrewBar.app
  EOS
end
