diff --git a/Casks/dotnet-sdk9-preview.rb b/Casks/dotnet-sdk9-preview.rb new file mode 100644 index 000000000..d566ae895 --- /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: ">= :monterey" + + 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 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.