Files
homebrew-cask/Casks/visual-studio-code.rb

40 lines
1.4 KiB
Ruby

cask "visual-studio-code" do
version "1.55.2"
if Hardware::CPU.intel?
sha256 "c3621a13c9a927e99563513f95593d4d605f70a123e538681fba6d3ef6ec9dee"
url "https://update.code.visualstudio.com/#{version}/darwin/stable"
else
sha256 "be3a1ebfac2c6c5e882714304adc518aff8bac6b663e194a9e73524c62065b94"
url "https://update.code.visualstudio.com/#{version}/darwin-arm64/stable"
end
name "Microsoft Visual Studio Code"
name "VS Code"
desc "Open-source code editor"
homepage "https://code.visualstudio.com/"
livecheck do
url "https://update.code.visualstudio.com/api/update/darwin-universal/stable/VERSION"
strategy :page_match
regex(/"productVersion"\s*:\s*"(\d+(:?\.\d+)*)"/)
end
auto_updates true
app "Visual Studio Code.app"
binary "#{appdir}/Visual Studio Code.app/Contents/Resources/app/bin/code"
zap trash: [
"~/Library/Application Support/Code",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.vscode.sfl*",
"~/Library/Caches/com.microsoft.VSCode",
"~/Library/Caches/com.microsoft.VSCode.ShipIt",
"~/Library/Preferences/ByHost/com.microsoft.VSCode.ShipIt.*.plist",
"~/Library/Preferences/com.microsoft.VSCode.helper.plist",
"~/Library/Preferences/com.microsoft.VSCode.plist",
"~/Library/Saved Application State/com.microsoft.VSCode.savedState",
"~/.vscode",
]
end