cask "sf" do arch arm: "arm64", intel: "x64" version "2.66.7,5567872" sha256 arm: "69655426e108169e9768bfab04f143efa715bcac69c89a4bb52b8fba3eac6f07", intel: "8932b158ca11a0bd44b1b280d53479e6585f56686b295fbb2918c9ffa0d4406a" url "https://github.com/salesforcecli/cli/releases/download/#{version.csv.first}/sf-v#{version.csv.first}-#{version.csv.second}-#{arch}.pkg", verified: "github.com/salesforcecli/cli/" name "Salesforce CLI" desc "Salesforce CLI tools" homepage "https://developer.salesforce.com/tools/salesforcecli" livecheck do url "https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-darwin-#{arch}-buildmanifest" strategy :json do |json| next if json["version"].blank? || json["sha"].blank? "#{json["version"]},#{json["sha"]}" end end depends_on macos: ">= :el_capitan" pkg "sf-v#{version.csv.first}-#{version.csv.second}-#{arch}.pkg" uninstall pkgutil: "com.salesforce.cli", delete: [ "/usr/local/bin/sf", "/usr/local/bin/sfdx", ] zap trash: [ "~/.cache/sf", "~/.config/sf", "~/.local/share/sf", "~/.sf", ] end