Skip to content

Commit

Permalink
Merge pull request #196 from AArnott/installerUpdate
Browse files Browse the repository at this point in the history
Updated SDK installer script to be able to find 7.0.200
  • Loading branch information
AArnott authored Mar 13, 2023
2 parents 54bd19a + 2987b44 commit 08114e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.101",
"version": "7.0.201",
"rollForward": "patch",
"allowPrerelease": false
}
Expand Down
10 changes: 9 additions & 1 deletion tools/Install-DotNetSdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ Function Get-InstallerExe(
if ($release.$sku.version -eq $Version) {
$filesElement = $release.$sku.files
}
if (!$filesElement -and ($sku -eq 'sdk') -and $release.sdks) {
foreach ($sdk in $release.sdks) {
if ($sdk.version -eq $Version) {
$filesElement = $sdk.files
break
}
}
}

if ($filesElement) {
foreach ($file in $filesElement) {
Expand All @@ -155,7 +163,7 @@ Function Get-InstallerExe(
if ($url) {
Get-FileFromWeb -Uri $url -OutDir $DotNetInstallScriptRoot
} else {
Write-Error "Unable to find release of $sku v$Version"
throw "Unable to find release of $sku v$Version"
}
}

Expand Down

0 comments on commit 08114e6

Please sign in to comment.