-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
/
dotnet-sdk.rb
46 lines (39 loc) 路 1.35 KB
/
dotnet-sdk.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cask "dotnet-sdk" do
arch arm: "arm64", intel: "x64"
on_arm do
version "8.0.303,763ab233-7f0e-481c-8b8a-c432328330a5,8a1d8bed9188f553e1cd3ea2b615a93a"
sha256 "fe05de094fdacf95c34fe641e630f224a13d10b0d426ed73ea3d735c55d8eb77"
end
on_intel do
version "8.0.303,827eac3c-729c-4416-bdf4-0fae6ec6492f,40ccf2187797de61688d354da3e43090"
sha256 "8736c67245611b6c18e102e3b74035be03308b71709c29924503d8332e775a59"
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",
"dotnet-sdk@preview",
"dotnet@preview",
], formula: "dotnet"
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