Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dotnet-sdk9-preview #316

Merged
merged 3 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions Casks/dotnet-sdk9-preview.rb
Original file line number Diff line number Diff line change
@@ -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
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading