From d532081525e7d0ca18bd65bcf8b4cd86152fb10d Mon Sep 17 00:00:00 2001 From: Shupeng Xue Date: Mon, 19 Feb 2024 11:26:45 +1100 Subject: [PATCH 1/3] Add support for dotnet-sdk9-preview --- Casks/dotnet-sdk9-preview.rb | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Casks/dotnet-sdk9-preview.rb diff --git a/Casks/dotnet-sdk9-preview.rb b/Casks/dotnet-sdk9-preview.rb new file mode 100644 index 000000000..2f9068d78 --- /dev/null +++ b/Casks/dotnet-sdk9-preview.rb @@ -0,0 +1,46 @@ +cask "dotnet-sdk9-preview" do + arch arm: "arm64", intel: "x64" + + version "9.0.100-preview.1.24101.2,9.0.0-preview.1.24080.9" + sha256_x64 = "70b3e7535ffaa3554d88903510445475348b582d286a78b1d0c317703d389c08" + sha256_arm64 = "29cd968609c9b4a769b069d857419f8e5422b9168638bdde3ecab36bd0e8ee9c" + url_x64 = "https://download.visualstudio.microsoft.com/download/pr/5c78b512-56ef-49a1-b181-96ca60917c06/f6ad92dac6791efabedd862a495e7d4b/dotnet-sdk-#{version.csv.first}-osx-x64.pkg" + url_arm64 = "https://download.visualstudio.microsoft.com/download/pr/f3a5f6fd-0b74-407c-a3cf-52792d76415f/53c4911d66ce7a8757c9d10c2c4d6414/dotnet-sdk-#{version.csv.first}-osx-arm64.pkg" + + on_arm do + sha256 sha256_arm64 + + url url_arm64 + end + on_intel do + sha256 sha256_x64 + + url url_x64 + end + + name ".NET Core SDK #{version.csv.first}" + desc "This cask follows releases from https://github.com/dotnet/core/tree/master" + homepage "https://www.microsoft.com/net/core#macos" + + livecheck do + skip "See https://github.com/isen-ng/homebrew-dotnet-sdk-versions/blob/master/CONTRIBUTING.md#automatic-updates" + end + + depends_on macos: ">= :mojave" + + pkg "dotnet-sdk-#{version.csv.first}-osx-#{arch}.pkg" + + uninstall pkgutil: "com.microsoft.dotnet.dev.#{version.csv.first}.component.osx.#{arch}" + + zap pkgutil: [ + "com.microsoft.dotnet.hostfxr.#{version.csv.second}.component.osx.#{arch}", + "com.microsoft.dotnet.pack.apphost.#{version.csv.second}.component.osx.#{arch}", + "com.microsoft.dotnet.sharedframework.Microsoft.NETCore.App.#{version.csv.second}.component.osx.#{arch}", + "com.microsoft.dotnet.sharedhost.component.osx.#{arch}", + ], + trash: ["~/.dotnet", "~/.nuget", "/etc/paths.d/dotnet", "/etc/paths.d/dotnet-cli-tools"] + + caveats "Uninstalling the offical dotnet-sdk casks will remove the shared runtime dependencies, " \ + "so you'll need to reinstall the particular version cask you want from this tap again " \ + "for the `dotnet` command to work again." +end From 8adf8e98d086694d04fd6fc82d25b20271eab531 Mon Sep 17 00:00:00 2001 From: Shupeng Xue Date: Mon, 19 Feb 2024 11:35:57 +1100 Subject: [PATCH 2/3] Update preview versions in README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a7b456a69..41ba840df 100644 --- a/README.md +++ b/README.md @@ -55,10 +55,11 @@ after installing/upgrading to .NET SDK 5. ### Preview versions -| Version | .NET SDK | Arch | Remarks | -| --------------------- | --------------------- | ----------- | ------- | -| `dotnet-sdk8-preview` | 8.0.101-rc.2.23502.2 | x64 & arm64 | | -| `dotnet-sdk7-preview` | 7.0.100-rc.2.22477.23 | x64 & arm64 | | +| Version | .NET SDK | Arch | Remarks | +| --------------------- | -------------------------- | ----------- | ------- | +| `dotnet-sdk9-preview` | 9.0.100-preview.1.24101.2 | x64 & arm64 | | +| `dotnet-sdk8-preview` | 8.0.101-rc.2.23502.2 | x64 & arm64 | | +| `dotnet-sdk7-preview` | 7.0.100-rc.2.22477.23 | x64 & arm64 | | **Note**: Preview versions is a newly supported feature (as of September 2022). Please send feedback/create issues if there are problems with the compatibility of the preview versions. From 749b18c478ebbbf88290bbdc632b869a758d08a3 Mon Sep 17 00:00:00 2001 From: Shupeng Xue Date: Mon, 19 Feb 2024 12:43:32 +1100 Subject: [PATCH 3/3] Update macOS dependency to Monterey --- Casks/dotnet-sdk9-preview.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Casks/dotnet-sdk9-preview.rb b/Casks/dotnet-sdk9-preview.rb index 2f9068d78..d566ae895 100644 --- a/Casks/dotnet-sdk9-preview.rb +++ b/Casks/dotnet-sdk9-preview.rb @@ -26,7 +26,7 @@ skip "See https://github.com/isen-ng/homebrew-dotnet-sdk-versions/blob/master/CONTRIBUTING.md#automatic-updates" end - depends_on macos: ">= :mojave" + depends_on macos: ">= :monterey" pkg "dotnet-sdk-#{version.csv.first}-osx-#{arch}.pkg"