mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-06-30 06:12:15 -06:00
41 lines
1.4 KiB
Ruby
41 lines
1.4 KiB
Ruby
cask "dotnet-preview" do
|
|
arch = Hardware::CPU.intel? ? "x64" : "arm64"
|
|
|
|
if Hardware::CPU.intel?
|
|
version "7.0.0-preview.6.22324.4,daa4040d-22af-4cc2-bbcd-ddfded0ab23f,fb6fe137309f9e8634d38b6d930aac16"
|
|
sha256 "e1b541d73d5d44c93e5e73d5c172ea0cda6b0c3466f10dfd9bc2d427181b6335"
|
|
else
|
|
version "7.0.0-preview.1.22076.8,17b7ed90-2cac-4a18-9d04-787fb76a0175,52773df7c2c4982728cc153111c8a0aa"
|
|
sha256 "1910170a8f4c1223a3b7a5cbcbdfb4763e7897e57570d4dd74ece98f08203814"
|
|
end
|
|
|
|
url "https://download.visualstudio.microsoft.com/download/pr/#{version.csv[1]}/#{version.csv[2]}/dotnet-runtime-#{version.csv[0]}-osx-#{arch}.pkg"
|
|
name ".Net Runtime"
|
|
desc "Developer platform"
|
|
homepage "https://www.microsoft.com/net/core#macos"
|
|
|
|
livecheck do
|
|
url "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/#{version.major_minor}/releases.json"
|
|
regex(%r{/download/pr/([^/]+)/([^/]+)/dotnet-runtime-v?(.+)-osx-#{arch}\.pkg}i)
|
|
strategy :page_match do |page, regex|
|
|
page.scan(regex).map do |match|
|
|
"#{match[2]},#{match[0]},#{match[1]}"
|
|
end
|
|
end
|
|
end
|
|
|
|
conflicts_with cask: [
|
|
"dotnet",
|
|
"dotnet-sdk",
|
|
"dotnet-sdk-preview",
|
|
], formula: "dotnet"
|
|
depends_on macos: ">= :mojave"
|
|
|
|
pkg "dotnet-runtime-#{version.csv[0]}-osx-#{arch}.pkg"
|
|
binary "/usr/local/share/dotnet/dotnet"
|
|
|
|
uninstall pkgutil: "com.microsoft.dotnet.*",
|
|
delete: "/etc/paths.d/dotnet"
|
|
|
|
zap trash: "~/.nuget"
|
|
end
|