46 lines
1.4 KiB
Ruby
46 lines
1.4 KiB
Ruby
cask "dotnet-sdk" do
|
|
arch = Hardware::CPU.intel? ? "x64" : "arm64"
|
|
|
|
if Hardware::CPU.intel?
|
|
version "6.0.100,14a45451-4cc9-48e1-af69-0aff75891d09,ff6e83986a2a9a535015fb3104a90a1b"
|
|
sha256 "9203560506408d8f88774358b03cdcfcfa0495682fde6034b24f7ccaeddce2ef"
|
|
else
|
|
version "6.0.100,ed60d37e-7842-4fc2-8250-2bd66073d79e,725d486e04d27e45d2b41c687dc35f49"
|
|
sha256 "df96e334b5ac10e9e4abccf81376f52da1ed0fb0ad3822709e3c27b8c0bfa01a"
|
|
end
|
|
|
|
url "https://download.visualstudio.microsoft.com/download/pr/#{version.csv.second}/#{version.csv.third}/dotnet-sdk-#{version.csv.first}-osx-#{arch}.pkg"
|
|
name ".NET SDK"
|
|
desc "Developer platform"
|
|
homepage "https://www.microsoft.com/net/core#macos"
|
|
|
|
livecheck do
|
|
cask "dotnet"
|
|
regex(%r{/download/pr/([^/]+)/([^/]+)/dotnet-sdk-v?(\d+(?:\.\d+)+)-osx-#{arch}\.pkg}i)
|
|
end
|
|
|
|
conflicts_with cask: [
|
|
"dotnet",
|
|
"homebrew/cask-versions/dotnet-preview",
|
|
"homebrew/cask-versions/dotnet-sdk-preview",
|
|
]
|
|
depends_on macos: ">= :mojave"
|
|
|
|
pkg "dotnet-sdk-#{version.csv.first}-osx-#{arch}.pkg"
|
|
binary "/usr/local/share/dotnet/dotnet"
|
|
|
|
uninstall pkgutil: [
|
|
"com.microsoft.dotnet.*",
|
|
"com.microsoft.netstandard.pack.targeting.*",
|
|
],
|
|
delete: [
|
|
"/etc/paths.d/dotnet",
|
|
"/etc/paths.d/dotnet-cli-tools",
|
|
]
|
|
|
|
zap trash: [
|
|
"~/.dotnet",
|
|
"~/.nuget",
|
|
]
|
|
end
|