Casks/c/chef-workstation.rb
cask "chef-workstation" do
arch arm: "arm64", intel: "x86_64"
macos_version = "11"
version "24.8.1068"
sha256 arm: "636c1a320df9ea2dd30ce1c73552d8922d1ed5b5bd3976dce4429233f7da630a",
intel: "cda0de891a11c6a502a142172c386e06a1461d7312fa7a57b4169e107db9e37c"
url "https://packages.chef.io/files/stable/chef-workstation/#{version}/mac_os_x/#{macos_version}/chef-workstation-#{version}-1.#{arch}.dmg"
name "Chef Workstation"
desc "All-in-one installer for the tools you need to manage your Chef infrastructure"
homepage "https://docs.chef.io/workstation/"
livecheck do
url "https://omnitruck.chef.io/stable/chef-workstation/metadata?p=mac_os_x&pv=#{macos_version}&m=#{arch}&v=latest"
regex(/version\s*(\d+(?:\.\d+)+)/i)
end
depends_on macos: ">= :big_sur"
pkg "chef-workstation-#{version}-1.#{arch}.pkg"
uninstall launchctl: [
"io.chef.chef-workstation",
"io.chef.chef-workstation.app",
],
quit: "sh.chef.chef-workstation",
script: {
executable: "/opt/chef-workstation/bin/uninstall_chef_workstation",
sudo: true,
},
pkgutil: "com.getchef.pkg.chef-workstation"
zap trash: "~/.chef-workstation/"
end