mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 23:50:19 +00:00
update setup-node versions and run generation scripts
This commit is contained in:
parent
0f810b3efe
commit
9c461e836e
4
.github/workflows/check-dist.yml
vendored
4
.github/workflows/check-dist.yml
vendored
@ -23,10 +23,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set Node.js 12.x
|
- name: Set Node.js 16.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 16.x
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
4
.github/workflows/workflow.yml
vendored
4
.github/workflows/workflow.yml
vendored
@ -21,10 +21,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Set Node.js 12
|
- name: Set Node.js 16
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 16.x
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npm run format-check
|
- run: npm run format-check
|
||||||
|
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -5883,7 +5883,7 @@ module.exports = require("https");
|
|||||||
/***/ 215:
|
/***/ 215:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = {"name":"@octokit/rest","version":"16.28.9","publishConfig":{"access":"public"},"description":"GitHub REST API client for Node.js","keywords":["octokit","github","rest","api-client"],"author":"Gregor Martynus (https://github.com/gr2m)","contributors":[{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Fabian Jakobs","email":"fabian@c9.io"},{"name":"Joe Gallo","email":"joe@brassafrax.com"},{"name":"Gregor Martynus","url":"https://github.com/gr2m"}],"repository":"https://github.com/octokit/rest.js","dependencies":{"@octokit/request":"^5.0.0","@octokit/request-error":"^1.0.2","atob-lite":"^2.0.0","before-after-hook":"^2.0.0","btoa-lite":"^1.0.0","deprecation":"^2.0.0","lodash.get":"^4.4.2","lodash.set":"^4.3.2","lodash.uniq":"^4.5.0","octokit-pagination-methods":"^1.1.0","once":"^1.4.0","universal-user-agent":"^4.0.0"},"devDependencies":{"@gimenete/type-writer":"^0.1.3","@octokit/fixtures-server":"^5.0.1","@octokit/routes":"20.9.2","@types/node":"^12.0.0","bundlesize":"^0.18.0","chai":"^4.1.2","compression-webpack-plugin":"^3.0.0","coveralls":"^3.0.0","glob":"^7.1.2","http-proxy-agent":"^2.1.0","lodash.camelcase":"^4.3.0","lodash.merge":"^4.6.1","lodash.upperfirst":"^4.3.1","mkdirp":"^0.5.1","mocha":"^6.0.0","mustache":"^3.0.0","nock":"^10.0.0","npm-run-all":"^4.1.2","nyc":"^14.0.0","prettier":"^1.14.2","proxy":"^0.2.4","semantic-release":"^15.0.0","sinon":"^7.2.4","sinon-chai":"^3.0.0","sort-keys":"^4.0.0","standard":"^14.0.2","string-to-arraybuffer":"^1.0.0","string-to-jsdoc-comment":"^1.0.0","typescript":"^3.3.1","webpack":"^4.0.0","webpack-bundle-analyzer":"^3.0.0","webpack-cli":"^3.0.0"},"types":"index.d.ts","scripts":{"coverage":"nyc report --reporter=html && open coverage/index.html","pretest":"standard","test":"nyc mocha test/mocha-node-setup.js \"test/*/**/*-test.js\"","test:browser":"cypress run --browser chrome","test:memory":"mocha test/memory-test","build":"npm-run-all build:*","build:ts":"node scripts/generate-types","prebuild:browser":"mkdirp dist/","build:browser":"npm-run-all build:browser:*","build:browser:development":"webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json","build:browser:production":"webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map","generate-bundle-report":"webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html","generate-routes":"node scripts/generate-routes","prevalidate:ts":"npm run -s build:ts","validate:ts":"tsc --target es6 --noImplicitAny index.d.ts","postvalidate:ts":"tsc --noEmit --target es6 test/typescript-validate.ts","start-fixtures-server":"octokit-fixtures-server"},"license":"MIT","files":["index.js","index.d.ts","lib","plugins"],"nyc":{"ignore":["test"]},"release":{"publish":["@semantic-release/npm",{"path":"@semantic-release/github","assets":["dist/*","!dist/*.map.gz"]}]},"standard":{"globals":["describe","before","beforeEach","afterEach","after","it","expect","cy"],"ignore":["/docs"]},"bundlesize":[{"path":"./dist/octokit-rest.min.js.gz","maxSize":"33 kB"}],"_resolved":"https://registry.npmjs.org/@octokit/rest/-/rest-16.28.9.tgz","_integrity":"sha512-IKGnX+Tvzt7XHhs8f4ajqxyJvYAMNX5nWfoJm4CQj8LZToMiaJgutf5KxxpxoC3y5w7JTJpW5rnWnF4TsIvCLA==","_from":"@octokit/rest@16.28.9"};
|
module.exports = {"name":"@octokit/rest","version":"16.28.9","publishConfig":{"access":"public"},"description":"GitHub REST API client for Node.js","keywords":["octokit","github","rest","api-client"],"author":"Gregor Martynus (https://github.com/gr2m)","contributors":[{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Fabian Jakobs","email":"fabian@c9.io"},{"name":"Joe Gallo","email":"joe@brassafrax.com"},{"name":"Gregor Martynus","url":"https://github.com/gr2m"}],"repository":"https://github.com/octokit/rest.js","dependencies":{"@octokit/request":"^5.0.0","@octokit/request-error":"^1.0.2","atob-lite":"^2.0.0","before-after-hook":"^2.0.0","btoa-lite":"^1.0.0","deprecation":"^2.0.0","lodash.get":"^4.4.2","lodash.set":"^4.3.2","lodash.uniq":"^4.5.0","octokit-pagination-methods":"^1.1.0","once":"^1.4.0","universal-user-agent":"^4.0.0"},"devDependencies":{"@gimenete/type-writer":"^0.1.3","@octokit/fixtures-server":"^5.0.1","@octokit/routes":"20.9.2","@types/node":"^12.0.0","bundlesize":"^0.18.0","chai":"^4.1.2","compression-webpack-plugin":"^3.0.0","coveralls":"^3.0.0","glob":"^7.1.2","http-proxy-agent":"^2.1.0","lodash.camelcase":"^4.3.0","lodash.merge":"^4.6.1","lodash.upperfirst":"^4.3.1","mkdirp":"^0.5.1","mocha":"^6.0.0","mustache":"^3.0.0","nock":"^10.0.0","npm-run-all":"^4.1.2","nyc":"^14.0.0","prettier":"^1.14.2","proxy":"^0.2.4","semantic-release":"^15.0.0","sinon":"^7.2.4","sinon-chai":"^3.0.0","sort-keys":"^4.0.0","standard":"^14.0.2","string-to-arraybuffer":"^1.0.0","string-to-jsdoc-comment":"^1.0.0","typescript":"^3.3.1","webpack":"^4.0.0","webpack-bundle-analyzer":"^3.0.0","webpack-cli":"^3.0.0"},"types":"index.d.ts","scripts":{"coverage":"nyc report --reporter=html && open coverage/index.html","pretest":"standard","test":"nyc mocha test/mocha-node-setup.js \"test/*/**/*-test.js\"","test:browser":"cypress run --browser chrome","test:memory":"mocha test/memory-test","build":"npm-run-all build:*","build:ts":"node scripts/generate-types","prebuild:browser":"mkdirp dist/","build:browser":"npm-run-all build:browser:*","build:browser:development":"webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json","build:browser:production":"webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map","generate-bundle-report":"webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html","generate-routes":"node scripts/generate-routes","prevalidate:ts":"npm run -s build:ts","validate:ts":"tsc --target es6 --noImplicitAny index.d.ts","postvalidate:ts":"tsc --noEmit --target es6 test/typescript-validate.ts","start-fixtures-server":"octokit-fixtures-server"},"license":"MIT","files":["index.js","index.d.ts","lib","plugins"],"nyc":{"ignore":["test"]},"release":{"publish":["@semantic-release/npm",{"path":"@semantic-release/github","assets":["dist/*","!dist/*.map.gz"]}]},"standard":{"globals":["describe","before","beforeEach","afterEach","after","it","expect","cy"],"ignore":["/docs"]},"bundlesize":[{"path":"./dist/octokit-rest.min.js.gz","maxSize":"33 kB"}]};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
@ -8298,7 +8298,7 @@ function octokitRestNormalizeGitReferenceResponses (octokit) {
|
|||||||
/***/ 314:
|
/***/ 314:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = {"name":"@octokit/graphql","version":"2.1.3","publishConfig":{"access":"public"},"description":"GitHub GraphQL API client for browsers and Node","main":"index.js","scripts":{"prebuild":"mkdirp dist/","build":"npm-run-all build:*","build:development":"webpack --mode development --entry . --output-library=octokitGraphql --output=./dist/octokit-graphql.js --profile --json > dist/bundle-stats.json","build:production":"webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=octokitGraphql --output-path=./dist --output-filename=octokit-graphql.min.js --devtool source-map","bundle-report":"webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html","coverage":"nyc report --reporter=html && open coverage/index.html","coverage:upload":"nyc report --reporter=text-lcov | coveralls","pretest":"standard","test":"nyc mocha test/*-test.js","test:browser":"cypress run --browser chrome"},"repository":{"type":"git","url":"https://github.com/octokit/graphql.js.git"},"keywords":["octokit","github","api","graphql"],"author":"Gregor Martynus (https://github.com/gr2m)","license":"MIT","bugs":{"url":"https://github.com/octokit/graphql.js/issues"},"homepage":"https://github.com/octokit/graphql.js#readme","dependencies":{"@octokit/request":"^5.0.0","universal-user-agent":"^2.0.3"},"devDependencies":{"chai":"^4.2.0","compression-webpack-plugin":"^2.0.0","coveralls":"^3.0.3","cypress":"^3.1.5","fetch-mock":"^7.3.1","mkdirp":"^0.5.1","mocha":"^6.0.0","npm-run-all":"^4.1.3","nyc":"^14.0.0","semantic-release":"^15.13.3","simple-mock":"^0.8.0","standard":"^12.0.1","webpack":"^4.29.6","webpack-bundle-analyzer":"^3.1.0","webpack-cli":"^3.2.3"},"bundlesize":[{"path":"./dist/octokit-graphql.min.js.gz","maxSize":"5KB"}],"release":{"publish":["@semantic-release/npm",{"path":"@semantic-release/github","assets":["dist/*","!dist/*.map.gz"]}]},"standard":{"globals":["describe","before","beforeEach","afterEach","after","it","expect"]},"files":["lib"],"_resolved":"https://registry.npmjs.org/@octokit/graphql/-/graphql-2.1.3.tgz","_integrity":"sha512-XoXJqL2ondwdnMIW3wtqJWEwcBfKk37jO/rYkoxNPEVeLBDGsGO1TCWggrAlq3keGt/O+C/7VepXnukUxwt5vA==","_from":"@octokit/graphql@2.1.3"};
|
module.exports = {"name":"@octokit/graphql","version":"2.1.3","publishConfig":{"access":"public"},"description":"GitHub GraphQL API client for browsers and Node","main":"index.js","scripts":{"prebuild":"mkdirp dist/","build":"npm-run-all build:*","build:development":"webpack --mode development --entry . --output-library=octokitGraphql --output=./dist/octokit-graphql.js --profile --json > dist/bundle-stats.json","build:production":"webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=octokitGraphql --output-path=./dist --output-filename=octokit-graphql.min.js --devtool source-map","bundle-report":"webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html","coverage":"nyc report --reporter=html && open coverage/index.html","coverage:upload":"nyc report --reporter=text-lcov | coveralls","pretest":"standard","test":"nyc mocha test/*-test.js","test:browser":"cypress run --browser chrome"},"repository":{"type":"git","url":"https://github.com/octokit/graphql.js.git"},"keywords":["octokit","github","api","graphql"],"author":"Gregor Martynus (https://github.com/gr2m)","license":"MIT","bugs":{"url":"https://github.com/octokit/graphql.js/issues"},"homepage":"https://github.com/octokit/graphql.js#readme","dependencies":{"@octokit/request":"^5.0.0","universal-user-agent":"^2.0.3"},"devDependencies":{"chai":"^4.2.0","compression-webpack-plugin":"^2.0.0","coveralls":"^3.0.3","cypress":"^3.1.5","fetch-mock":"^7.3.1","mkdirp":"^0.5.1","mocha":"^6.0.0","npm-run-all":"^4.1.3","nyc":"^14.0.0","semantic-release":"^15.13.3","simple-mock":"^0.8.0","standard":"^12.0.1","webpack":"^4.29.6","webpack-bundle-analyzer":"^3.1.0","webpack-cli":"^3.2.3"},"bundlesize":[{"path":"./dist/octokit-graphql.min.js.gz","maxSize":"5KB"}],"release":{"publish":["@semantic-release/npm",{"path":"@semantic-release/github","assets":["dist/*","!dist/*.map.gz"]}]},"standard":{"globals":["describe","before","beforeEach","afterEach","after","it","expect"]},"files":["lib"]};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
636
externals/install-dotnet.ps1
vendored
636
externals/install-dotnet.ps1
vendored
@ -66,11 +66,13 @@
|
|||||||
Displays diagnostics information.
|
Displays diagnostics information.
|
||||||
.PARAMETER AzureFeed
|
.PARAMETER AzureFeed
|
||||||
Default: https://dotnetcli.azureedge.net/dotnet
|
Default: https://dotnetcli.azureedge.net/dotnet
|
||||||
This parameter typically is not changed by the user.
|
For internal use only.
|
||||||
It allows changing the URL for the Azure feed used by this installer.
|
Allows using a different storage to download SDK archives from.
|
||||||
|
This parameter is only used if $NoCdn is false.
|
||||||
.PARAMETER UncachedFeed
|
.PARAMETER UncachedFeed
|
||||||
This parameter typically is not changed by the user.
|
For internal use only.
|
||||||
It allows changing the URL for the Uncached feed used by this installer.
|
Allows using a different storage to download SDK archives from.
|
||||||
|
This parameter is only used if $NoCdn is true.
|
||||||
.PARAMETER ProxyAddress
|
.PARAMETER ProxyAddress
|
||||||
If set, the installer will use the proxy when making web requests
|
If set, the installer will use the proxy when making web requests
|
||||||
.PARAMETER ProxyUseDefaultCredentials
|
.PARAMETER ProxyUseDefaultCredentials
|
||||||
@ -101,11 +103,11 @@ param(
|
|||||||
[string]$Architecture="<auto>",
|
[string]$Architecture="<auto>",
|
||||||
[string]$Runtime,
|
[string]$Runtime,
|
||||||
[Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")]
|
[Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")]
|
||||||
[switch]$SharedRuntime,
|
[Parameter(DontShow=$true)][switch]$SharedRuntime,
|
||||||
[switch]$DryRun,
|
[switch]$DryRun,
|
||||||
[switch]$NoPath,
|
[switch]$NoPath,
|
||||||
[string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet",
|
[Parameter(DontShow=$true)][string]$AzureFeed,
|
||||||
[string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet",
|
[Parameter(DontShow=$true)][string]$UncachedFeed,
|
||||||
[string]$FeedCredential,
|
[string]$FeedCredential,
|
||||||
[string]$ProxyAddress,
|
[string]$ProxyAddress,
|
||||||
[switch]$ProxyUseDefaultCredentials,
|
[switch]$ProxyUseDefaultCredentials,
|
||||||
@ -119,20 +121,6 @@ Set-StrictMode -Version Latest
|
|||||||
$ErrorActionPreference="Stop"
|
$ErrorActionPreference="Stop"
|
||||||
$ProgressPreference="SilentlyContinue"
|
$ProgressPreference="SilentlyContinue"
|
||||||
|
|
||||||
if ($NoCdn) {
|
|
||||||
$AzureFeed = $UncachedFeed
|
|
||||||
}
|
|
||||||
|
|
||||||
$BinFolderRelativePath=""
|
|
||||||
|
|
||||||
if ($SharedRuntime -and (-not $Runtime)) {
|
|
||||||
$Runtime = "dotnet"
|
|
||||||
}
|
|
||||||
|
|
||||||
# example path with regex: shared/1.0.0-beta-12345/somepath
|
|
||||||
$VersionRegEx="/\d+\.\d+[^/]+/"
|
|
||||||
$OverrideNonVersionedFiles = !$SkipNonVersionedFiles
|
|
||||||
|
|
||||||
function Say($str) {
|
function Say($str) {
|
||||||
try {
|
try {
|
||||||
Write-Host "dotnet-install: $str"
|
Write-Host "dotnet-install: $str"
|
||||||
@ -207,9 +195,7 @@ function Get-Machine-Architecture() {
|
|||||||
# To get the correct architecture, we need to use PROCESSOR_ARCHITEW6432.
|
# To get the correct architecture, we need to use PROCESSOR_ARCHITEW6432.
|
||||||
# PS x64 doesn't define this, so we fall back to PROCESSOR_ARCHITECTURE.
|
# PS x64 doesn't define this, so we fall back to PROCESSOR_ARCHITECTURE.
|
||||||
# Possible values: amd64, x64, x86, arm64, arm
|
# Possible values: amd64, x64, x86, arm64, arm
|
||||||
|
if( $ENV:PROCESSOR_ARCHITEW6432 -ne $null ) {
|
||||||
if( $ENV:PROCESSOR_ARCHITEW6432 -ne $null )
|
|
||||||
{
|
|
||||||
return $ENV:PROCESSOR_ARCHITEW6432
|
return $ENV:PROCESSOR_ARCHITEW6432
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,8 +205,11 @@ function Get-Machine-Architecture() {
|
|||||||
function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
|
function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
|
||||||
Say-Invocation $MyInvocation
|
Say-Invocation $MyInvocation
|
||||||
|
|
||||||
|
if ($Architecture -eq "<auto>") {
|
||||||
|
$Architecture = Get-Machine-Architecture
|
||||||
|
}
|
||||||
|
|
||||||
switch ($Architecture.ToLowerInvariant()) {
|
switch ($Architecture.ToLowerInvariant()) {
|
||||||
{ $_ -eq "<auto>" } { return Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) }
|
|
||||||
{ ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" }
|
{ ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" }
|
||||||
{ $_ -eq "x86" } { return "x86" }
|
{ $_ -eq "x86" } { return "x86" }
|
||||||
{ $_ -eq "arm" } { return "arm" }
|
{ $_ -eq "arm" } { return "arm" }
|
||||||
@ -229,7 +218,25 @@ function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ValidateFeedCredential([string] $FeedCredential)
|
||||||
|
{
|
||||||
|
if ($Internal -and [string]::IsNullOrWhitespace($FeedCredential)) {
|
||||||
|
$message = "Provide credentials via -FeedCredential parameter."
|
||||||
|
if ($DryRun) {
|
||||||
|
Say-Warning "$message"
|
||||||
|
} else {
|
||||||
|
throw "$message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#FeedCredential should start with "?", for it to be added to the end of the link.
|
||||||
|
#adding "?" at the beginning of the FeedCredential if needed.
|
||||||
|
if ((![string]::IsNullOrWhitespace($FeedCredential)) -and ($FeedCredential[0] -ne '?')) {
|
||||||
|
$FeedCredential = "?" + $FeedCredential
|
||||||
|
}
|
||||||
|
|
||||||
|
return $FeedCredential
|
||||||
|
}
|
||||||
function Get-NormalizedQuality([string]$Quality) {
|
function Get-NormalizedQuality([string]$Quality) {
|
||||||
Say-Invocation $MyInvocation
|
Say-Invocation $MyInvocation
|
||||||
|
|
||||||
@ -282,7 +289,7 @@ function Get-NormalizedProduct([string]$Runtime) {
|
|||||||
# Line 2: # 4-part version
|
# Line 2: # 4-part version
|
||||||
# For the aspnetcore runtime (1 line):
|
# For the aspnetcore runtime (1 line):
|
||||||
# Line 1: # 4-part version
|
# Line 1: # 4-part version
|
||||||
function Get-Version-Info-From-Version-Text([string]$VersionText) {
|
function Get-Version-From-LatestVersion-File-Content([string]$VersionText) {
|
||||||
Say-Invocation $MyInvocation
|
Say-Invocation $MyInvocation
|
||||||
|
|
||||||
$Data = -split $VersionText
|
$Data = -split $VersionText
|
||||||
@ -321,7 +328,11 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
|
|||||||
# Despite no proxy being explicitly specified, we may still be behind a default proxy
|
# Despite no proxy being explicitly specified, we may still be behind a default proxy
|
||||||
$DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
|
$DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
|
||||||
if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) {
|
if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) {
|
||||||
|
if ($null -ne $DefaultProxy.GetProxy($Uri)) {
|
||||||
$ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
|
$ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
|
||||||
|
} else {
|
||||||
|
$ProxyAddress = $null
|
||||||
|
}
|
||||||
$ProxyUseDefaultCredentials = $true
|
$ProxyUseDefaultCredentials = $true
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@ -424,21 +435,21 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) {
|
function Get-Version-From-LatestVersion-File([string]$AzureFeed, [string]$Channel) {
|
||||||
Say-Invocation $MyInvocation
|
Say-Invocation $MyInvocation
|
||||||
|
|
||||||
$VersionFileUrl = $null
|
$VersionFileUrl = $null
|
||||||
if ($Runtime -eq "dotnet") {
|
if ($Runtime -eq "dotnet") {
|
||||||
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
|
$VersionFileUrl = "$AzureFeed/Runtime/$Channel/latest.version"
|
||||||
}
|
}
|
||||||
elseif ($Runtime -eq "aspnetcore") {
|
elseif ($Runtime -eq "aspnetcore") {
|
||||||
$VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
|
$VersionFileUrl = "$AzureFeed/aspnetcore/Runtime/$Channel/latest.version"
|
||||||
}
|
}
|
||||||
elseif ($Runtime -eq "windowsdesktop") {
|
elseif ($Runtime -eq "windowsdesktop") {
|
||||||
$VersionFileUrl = "$UncachedFeed/WindowsDesktop/$Channel/latest.version"
|
$VersionFileUrl = "$AzureFeed/WindowsDesktop/$Channel/latest.version"
|
||||||
}
|
}
|
||||||
elseif (-not $Runtime) {
|
elseif (-not $Runtime) {
|
||||||
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
|
$VersionFileUrl = "$AzureFeed/Sdk/$Channel/latest.version"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw "Invalid value for `$Runtime"
|
throw "Invalid value for `$Runtime"
|
||||||
@ -450,7 +461,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) {
|
|||||||
$Response = GetHTTPResponse -Uri $VersionFileUrl
|
$Response = GetHTTPResponse -Uri $VersionFileUrl
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Say-Error "Could not resolve version information."
|
Say-Verbose "Failed to download latest.version file."
|
||||||
throw
|
throw
|
||||||
}
|
}
|
||||||
$StringContent = $Response.Content.ReadAsStringAsync().Result
|
$StringContent = $Response.Content.ReadAsStringAsync().Result
|
||||||
@ -462,7 +473,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) {
|
|||||||
default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." }
|
default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." }
|
||||||
}
|
}
|
||||||
|
|
||||||
$VersionInfo = Get-Version-Info-From-Version-Text $VersionText
|
$VersionInfo = Get-Version-From-LatestVersion-File-Content $VersionText
|
||||||
|
|
||||||
return $VersionInfo
|
return $VersionInfo
|
||||||
}
|
}
|
||||||
@ -509,7 +520,7 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel,
|
|||||||
|
|
||||||
if (-not $JSonFile) {
|
if (-not $JSonFile) {
|
||||||
if ($Version.ToLowerInvariant() -eq "latest") {
|
if ($Version.ToLowerInvariant() -eq "latest") {
|
||||||
$LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel
|
$LatestVersionInfo = Get-Version-From-LatestVersion-File -AzureFeed $AzureFeed -Channel $Channel
|
||||||
return $LatestVersionInfo.Version
|
return $LatestVersionInfo.Version
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -722,7 +733,8 @@ function Get-Absolute-Path([string]$RelativeOrAbsolutePath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-Path-Prefix-With-Version($path) {
|
function Get-Path-Prefix-With-Version($path) {
|
||||||
$match = [regex]::match($path, $VersionRegEx)
|
# example path with regex: shared/1.0.0-beta-12345/somepath
|
||||||
|
$match = [regex]::match($path, "/\d+\.\d+[^/]+/")
|
||||||
if ($match.Success) {
|
if ($match.Success) {
|
||||||
return $entry.FullName.Substring(0, $match.Index + $match.Length)
|
return $entry.FullName.Substring(0, $match.Index + $match.Length)
|
||||||
}
|
}
|
||||||
@ -736,7 +748,7 @@ function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([Sys
|
|||||||
$ret = @()
|
$ret = @()
|
||||||
foreach ($entry in $Zip.Entries) {
|
foreach ($entry in $Zip.Entries) {
|
||||||
$dir = Get-Path-Prefix-With-Version $entry.FullName
|
$dir = Get-Path-Prefix-With-Version $entry.FullName
|
||||||
if ($dir -ne $null) {
|
if ($null -ne $dir) {
|
||||||
$path = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $dir)
|
$path = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $dir)
|
||||||
if (-Not (Test-Path $path -PathType Container)) {
|
if (-Not (Test-Path $path -PathType Container)) {
|
||||||
$ret += $dir
|
$ret += $dir
|
||||||
@ -777,7 +789,7 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
|
|||||||
|
|
||||||
foreach ($entry in $Zip.Entries) {
|
foreach ($entry in $Zip.Entries) {
|
||||||
$PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName
|
$PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName
|
||||||
if (($PathWithVersion -eq $null) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
|
if (($null -eq $PathWithVersion) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
|
||||||
$DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName)
|
$DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName)
|
||||||
$DestinationDir = Split-Path -Parent $DestinationPath
|
$DestinationDir = Split-Path -Parent $DestinationPath
|
||||||
$OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath))
|
$OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath))
|
||||||
@ -789,7 +801,7 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if ($Zip -ne $null) {
|
if ($null -ne $Zip) {
|
||||||
$Zip.Dispose()
|
$Zip.Dispose()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -818,7 +830,7 @@ function DownloadFile($Source, [string]$OutPath) {
|
|||||||
$File.Close()
|
$File.Close()
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if ($Stream -ne $null) {
|
if ($null -ne $Stream) {
|
||||||
$Stream.Dispose()
|
$Stream.Dispose()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -841,8 +853,8 @@ function SafeRemoveFile($Path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolderRelativePath) {
|
function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot) {
|
||||||
$BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath)
|
$BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath "")
|
||||||
if (-Not $NoPath) {
|
if (-Not $NoPath) {
|
||||||
$SuffixedBinPath = "$BinPath;"
|
$SuffixedBinPath = "$BinPath;"
|
||||||
if (-Not $env:path.Contains($SuffixedBinPath)) {
|
if (-Not $env:path.Contains($SuffixedBinPath)) {
|
||||||
@ -857,6 +869,36 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolde
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function PrintDryRunOutput($Invocation, $DownloadLinks)
|
||||||
|
{
|
||||||
|
Say "Payload URLs:"
|
||||||
|
|
||||||
|
for ($linkIndex=0; $linkIndex -lt $DownloadLinks.count; $linkIndex++) {
|
||||||
|
Say "URL #$linkIndex - $($DownloadLinks[$linkIndex].type): $($DownloadLinks[$linkIndex].downloadLink)"
|
||||||
|
}
|
||||||
|
$RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`""
|
||||||
|
if ($Runtime -eq "dotnet") {
|
||||||
|
$RepeatableCommand+=" -Runtime `"dotnet`""
|
||||||
|
}
|
||||||
|
elseif ($Runtime -eq "aspnetcore") {
|
||||||
|
$RepeatableCommand+=" -Runtime `"aspnetcore`""
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($key in $Invocation.BoundParameters.Keys) {
|
||||||
|
if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version","Quality","FeedCredential") -contains $key)) {
|
||||||
|
$RepeatableCommand+=" -$key `"$($Invocation.BoundParameters[$key])`""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($Invocation.BoundParameters.Keys -contains "FeedCredential") {
|
||||||
|
$RepeatableCommand+=" -FeedCredential `"<feedCredential>`""
|
||||||
|
}
|
||||||
|
Say "Repeatable invocation: $RepeatableCommand"
|
||||||
|
if ($SpecificVersion -ne $EffectiveVersion)
|
||||||
|
{
|
||||||
|
Say "NOTE: Due to finding a version manifest with this runtime, it would actually install with version '$EffectiveVersion'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture) {
|
function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture) {
|
||||||
Say-Invocation $MyInvocation
|
Say-Invocation $MyInvocation
|
||||||
|
|
||||||
@ -930,25 +972,119 @@ function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Intern
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $NormalizedQuality, [bool] $Internal, [string] $ProductName, [string] $Architecture) {
|
||||||
|
$AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $ProductName -Architecture $Architecture
|
||||||
|
|
||||||
|
if ([string]::IsNullOrEmpty($AkaMsDownloadLink)){
|
||||||
|
if (-not [string]::IsNullOrEmpty($NormalizedQuality)) {
|
||||||
|
# if quality is specified - exit with error - there is no fallback approach
|
||||||
|
Say-Error "Failed to locate the latest version in the channel '$NormalizedChannel' with '$NormalizedQuality' quality for '$ProductName', os: 'win', architecture: '$Architecture'."
|
||||||
|
Say-Error "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support."
|
||||||
|
throw "aka.ms link resolution failure"
|
||||||
|
}
|
||||||
|
Say-Verbose "Falling back to latest.version file approach."
|
||||||
|
return ($null, $null, $null)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Say-Verbose "Retrieved primary named payload URL from aka.ms link: '$AkaMsDownloadLink'."
|
||||||
|
Say-Verbose "Downloading using legacy url will not be attempted."
|
||||||
|
|
||||||
|
#get version from the path
|
||||||
|
$pathParts = $AkaMsDownloadLink.Split('/')
|
||||||
|
if ($pathParts.Length -ge 2) {
|
||||||
|
$SpecificVersion = $pathParts[$pathParts.Length - 2]
|
||||||
|
Say-Verbose "Version: '$SpecificVersion'."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Say-Error "Failed to extract the version from download link '$AkaMsDownloadLink'."
|
||||||
|
return ($null, $null, $null)
|
||||||
|
}
|
||||||
|
|
||||||
|
#retrieve effective (product) version
|
||||||
|
$EffectiveVersion = Get-Product-Version -SpecificVersion $SpecificVersion -PackageDownloadLink $AkaMsDownloadLink
|
||||||
|
Say-Verbose "Product version: '$EffectiveVersion'."
|
||||||
|
|
||||||
|
return ($AkaMsDownloadLink, $SpecificVersion, $EffectiveVersion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-Feeds-To-Use()
|
||||||
|
{
|
||||||
|
$feeds = @(
|
||||||
|
"https://dotnetcli.azureedge.net/dotnet",
|
||||||
|
"https://dotnetbuilds.azureedge.net/public"
|
||||||
|
)
|
||||||
|
|
||||||
|
if (-not [string]::IsNullOrEmpty($AzureFeed)) {
|
||||||
|
$feeds = @($AzureFeed)
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($NoCdn) {
|
||||||
|
$feeds = @(
|
||||||
|
"https://dotnetcli.blob.core.windows.net/dotnet",
|
||||||
|
"https://dotnetbuilds.blob.core.windows.net/public"
|
||||||
|
)
|
||||||
|
|
||||||
|
if (-not [string]::IsNullOrEmpty($UncachedFeed)) {
|
||||||
|
$feeds = @($UncachedFeed)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $feeds
|
||||||
|
}
|
||||||
|
|
||||||
|
function Resolve-AssetName-And-RelativePath([string] $Runtime) {
|
||||||
|
|
||||||
|
if ($Runtime -eq "dotnet") {
|
||||||
|
$assetName = ".NET Core Runtime"
|
||||||
|
$dotnetPackageRelativePath = "shared\Microsoft.NETCore.App"
|
||||||
|
}
|
||||||
|
elseif ($Runtime -eq "aspnetcore") {
|
||||||
|
$assetName = "ASP.NET Core Runtime"
|
||||||
|
$dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App"
|
||||||
|
}
|
||||||
|
elseif ($Runtime -eq "windowsdesktop") {
|
||||||
|
$assetName = ".NET Core Windows Desktop Runtime"
|
||||||
|
$dotnetPackageRelativePath = "shared\Microsoft.WindowsDesktop.App"
|
||||||
|
}
|
||||||
|
elseif (-not $Runtime) {
|
||||||
|
$assetName = ".NET Core SDK"
|
||||||
|
$dotnetPackageRelativePath = "sdk"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw "Invalid value for `$Runtime"
|
||||||
|
}
|
||||||
|
|
||||||
|
return ($assetName, $dotnetPackageRelativePath)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Prepare-Install-Directory {
|
||||||
|
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
|
||||||
|
|
||||||
|
$installDrive = $((Get-Item $InstallRoot -Force).PSDrive.Name);
|
||||||
|
$diskInfo = $null
|
||||||
|
try{
|
||||||
|
$diskInfo = Get-PSDrive -Name $installDrive
|
||||||
|
}
|
||||||
|
catch{
|
||||||
|
Say-Warning "Failed to check the disk space. Installation will continue, but it may fail if you do not have enough disk space."
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ($null -ne $diskInfo) -and ($diskInfo.Free / 1MB -le 100)) {
|
||||||
|
throw "There is not enough disk space on drive ${installDrive}:"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
Say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
||||||
Say "- The SDK needs to be installed without user interaction and without admin rights."
|
Say "- The SDK needs to be installed without user interaction and without admin rights."
|
||||||
Say "- The SDK installation doesn't need to persist across multiple CI runs."
|
Say "- The SDK installation doesn't need to persist across multiple CI runs."
|
||||||
Say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n"
|
Say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n"
|
||||||
|
|
||||||
if ($Internal -and [string]::IsNullOrWhitespace($FeedCredential)) {
|
if ($SharedRuntime -and (-not $Runtime)) {
|
||||||
$message = "Provide credentials via -FeedCredential parameter."
|
$Runtime = "dotnet"
|
||||||
if ($DryRun) {
|
|
||||||
Say-Warning "$message"
|
|
||||||
} else {
|
|
||||||
throw "$message"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#FeedCredential should start with "?", for it to be added to the end of the link.
|
$OverrideNonVersionedFiles = !$SkipNonVersionedFiles
|
||||||
#adding "?" at the beginning of the FeedCredential if needed.
|
|
||||||
if ((![string]::IsNullOrWhitespace($FeedCredential)) -and ($FeedCredential[0] -ne '?')) {
|
|
||||||
$FeedCredential = "?" + $FeedCredential
|
|
||||||
}
|
|
||||||
|
|
||||||
$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
|
$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
|
||||||
$NormalizedQuality = Get-NormalizedQuality $Quality
|
$NormalizedQuality = Get-NormalizedQuality $Quality
|
||||||
@ -957,252 +1093,158 @@ $NormalizedChannel = Get-NormalizedChannel $Channel
|
|||||||
Say-Verbose "Normalized channel: '$NormalizedChannel'"
|
Say-Verbose "Normalized channel: '$NormalizedChannel'"
|
||||||
$NormalizedProduct = Get-NormalizedProduct $Runtime
|
$NormalizedProduct = Get-NormalizedProduct $Runtime
|
||||||
Say-Verbose "Normalized product: '$NormalizedProduct'"
|
Say-Verbose "Normalized product: '$NormalizedProduct'"
|
||||||
$DownloadLink = $null
|
$FeedCredential = ValidateFeedCredential $FeedCredential
|
||||||
|
|
||||||
#try to get download location from aka.ms link
|
|
||||||
#not applicable when exact version is specified via command or json file
|
|
||||||
if ([string]::IsNullOrEmpty($JSonFile) -and ($Version -eq "latest")) {
|
|
||||||
$AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $NormalizedProduct -Architecture $CLIArchitecture
|
|
||||||
|
|
||||||
if ([string]::IsNullOrEmpty($AkaMsDownloadLink)){
|
|
||||||
if (-not [string]::IsNullOrEmpty($NormalizedQuality)) {
|
|
||||||
# if quality is specified - exit with error - there is no fallback approach
|
|
||||||
Say-Error "Failed to locate the latest version in the channel '$NormalizedChannel' with '$NormalizedQuality' quality for '$NormalizedProduct', os: 'win', architecture: '$CLIArchitecture'."
|
|
||||||
Say-Error "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support."
|
|
||||||
throw "aka.ms link resolution failure"
|
|
||||||
}
|
|
||||||
Say-Verbose "Falling back to latest.version file approach."
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Say-Verbose "Retrieved primary named payload URL from aka.ms link: '$AkaMsDownloadLink'."
|
|
||||||
$DownloadLink = $AkaMsDownloadLink
|
|
||||||
Say-Verbose "Downloading using legacy url will not be attempted."
|
|
||||||
$LegacyDownloadLink = $null
|
|
||||||
|
|
||||||
#get version from the path
|
|
||||||
$pathParts = $DownloadLink.Split('/')
|
|
||||||
if ($pathParts.Length -ge 2) {
|
|
||||||
$SpecificVersion = $pathParts[$pathParts.Length - 2]
|
|
||||||
Say-Verbose "Version: '$SpecificVersion'."
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Say-Error "Failed to extract the version from download link '$DownloadLink'."
|
|
||||||
}
|
|
||||||
|
|
||||||
#retrieve effective (product) version
|
|
||||||
$EffectiveVersion = Get-Product-Version -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -PackageDownloadLink $DownloadLink
|
|
||||||
Say-Verbose "Product version: '$EffectiveVersion'."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ([string]::IsNullOrEmpty($DownloadLink)) {
|
|
||||||
$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version -JSonFile $JSonFile
|
|
||||||
$DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
|
|
||||||
$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$InstallRoot = Resolve-Installation-Path $InstallDir
|
$InstallRoot = Resolve-Installation-Path $InstallDir
|
||||||
Say-Verbose "InstallRoot: $InstallRoot"
|
Say-Verbose "InstallRoot: $InstallRoot"
|
||||||
$ScriptName = $MyInvocation.MyCommand.Name
|
$ScriptName = $MyInvocation.MyCommand.Name
|
||||||
|
($assetName, $dotnetPackageRelativePath) = Resolve-AssetName-And-RelativePath -Runtime $Runtime
|
||||||
|
|
||||||
|
$feeds = Get-Feeds-To-Use
|
||||||
|
$DownloadLinks = @()
|
||||||
|
|
||||||
|
# aka.ms links can only be used if the user did not request a specific version via the command line or a global.json file.
|
||||||
|
if ([string]::IsNullOrEmpty($JSonFile) -and ($Version -eq "latest")) {
|
||||||
|
($DownloadLink, $SpecificVersion, $EffectiveVersion) = Get-AkaMsLink-And-Version $NormalizedChannel $NormalizedQuality $Internal $NormalizedProduct $CLIArchitecture
|
||||||
|
|
||||||
|
if ($null -ne $DownloadLink) {
|
||||||
|
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$DownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='aka.ms'}
|
||||||
|
Say-Verbose "Generated aka.ms link $DownloadLink with version $EffectiveVersion"
|
||||||
|
|
||||||
|
if (-Not $DryRun) {
|
||||||
|
Say-Verbose "Checking if the version $EffectiveVersion is already installed"
|
||||||
|
if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion)
|
||||||
|
{
|
||||||
|
Say "$assetName with version '$EffectiveVersion' is already installed."
|
||||||
|
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Primary and legacy links cannot be used if a quality was specified.
|
||||||
|
# If we already have an aka.ms link, no need to search the blob feeds.
|
||||||
|
if ([string]::IsNullOrEmpty($NormalizedQuality) -and 0 -eq $DownloadLinks.count)
|
||||||
|
{
|
||||||
|
foreach ($feed in $feeds) {
|
||||||
|
try {
|
||||||
|
$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $feed -Channel $Channel -Version $Version -JSonFile $JSonFile
|
||||||
|
$DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
|
||||||
|
$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
|
||||||
|
|
||||||
|
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$DownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='primary'}
|
||||||
|
Say-Verbose "Generated primary link $DownloadLink with version $EffectiveVersion"
|
||||||
|
|
||||||
|
if (-not [string]::IsNullOrEmpty($LegacyDownloadLink)) {
|
||||||
|
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$LegacyDownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='legacy'}
|
||||||
|
Say-Verbose "Generated legacy link $LegacyDownloadLink with version $EffectiveVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-Not $DryRun) {
|
||||||
|
Say-Verbose "Checking if the version $EffectiveVersion is already installed"
|
||||||
|
if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion)
|
||||||
|
{
|
||||||
|
Say "$assetName with version '$EffectiveVersion' is already installed."
|
||||||
|
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Say-Verbose "Failed to acquire download links from feed $feed. Exception: $_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($DownloadLinks.count -eq 0) {
|
||||||
|
throw "Failed to resolve the exact version number."
|
||||||
|
}
|
||||||
|
|
||||||
if ($DryRun) {
|
if ($DryRun) {
|
||||||
Say "Payload URLs:"
|
PrintDryRunOutput $MyInvocation $DownloadLinks
|
||||||
Say "Primary named payload URL: ${DownloadLink}"
|
|
||||||
if ($LegacyDownloadLink) {
|
|
||||||
Say "Legacy named payload URL: ${LegacyDownloadLink}"
|
|
||||||
}
|
|
||||||
$RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`""
|
|
||||||
if ($Runtime -eq "dotnet") {
|
|
||||||
$RepeatableCommand+=" -Runtime `"dotnet`""
|
|
||||||
}
|
|
||||||
elseif ($Runtime -eq "aspnetcore") {
|
|
||||||
$RepeatableCommand+=" -Runtime `"aspnetcore`""
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-not [string]::IsNullOrEmpty($NormalizedQuality))
|
|
||||||
{
|
|
||||||
$RepeatableCommand+=" -Quality `"$NormalizedQuality`""
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($key in $MyInvocation.BoundParameters.Keys) {
|
|
||||||
if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version","Quality","FeedCredential") -contains $key)) {
|
|
||||||
$RepeatableCommand+=" -$key `"$($MyInvocation.BoundParameters[$key])`""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($MyInvocation.BoundParameters.Keys -contains "FeedCredential") {
|
|
||||||
$RepeatableCommand+=" -FeedCredential `"<feedCredential>`""
|
|
||||||
}
|
|
||||||
Say "Repeatable invocation: $RepeatableCommand"
|
|
||||||
if ($SpecificVersion -ne $EffectiveVersion)
|
|
||||||
{
|
|
||||||
Say "NOTE: Due to finding a version manifest with this runtime, it would actually install with version '$EffectiveVersion'"
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Runtime -eq "dotnet") {
|
Prepare-Install-Directory
|
||||||
$assetName = ".NET Core Runtime"
|
|
||||||
$dotnetPackageRelativePath = "shared\Microsoft.NETCore.App"
|
|
||||||
}
|
|
||||||
elseif ($Runtime -eq "aspnetcore") {
|
|
||||||
$assetName = "ASP.NET Core Runtime"
|
|
||||||
$dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App"
|
|
||||||
}
|
|
||||||
elseif ($Runtime -eq "windowsdesktop") {
|
|
||||||
$assetName = ".NET Core Windows Desktop Runtime"
|
|
||||||
$dotnetPackageRelativePath = "shared\Microsoft.WindowsDesktop.App"
|
|
||||||
}
|
|
||||||
elseif (-not $Runtime) {
|
|
||||||
$assetName = ".NET Core SDK"
|
|
||||||
$dotnetPackageRelativePath = "sdk"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw "Invalid value for `$Runtime"
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($SpecificVersion -ne $EffectiveVersion)
|
|
||||||
{
|
|
||||||
Say "Performing installation checks for effective version: $EffectiveVersion"
|
|
||||||
$SpecificVersion = $EffectiveVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if the SDK version is already installed.
|
|
||||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
|
|
||||||
if ($isAssetInstalled) {
|
|
||||||
Say "$assetName version $SpecificVersion is already installed."
|
|
||||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
|
|
||||||
|
|
||||||
$installDrive = $((Get-Item $InstallRoot -Force).PSDrive.Name);
|
|
||||||
$diskInfo = $null
|
|
||||||
try{
|
|
||||||
$diskInfo = Get-PSDrive -Name $installDrive
|
|
||||||
}
|
|
||||||
catch{
|
|
||||||
Say-Warning "Failed to check the disk space. Installation will continue, but it may fail if you do not have enough disk space."
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ($diskInfo -ne $null) -and ($diskInfo.Free / 1MB -le 100)) {
|
|
||||||
throw "There is not enough disk space on drive ${installDrive}:"
|
|
||||||
}
|
|
||||||
|
|
||||||
$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
|
$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
|
||||||
Say-Verbose "Zip path: $ZipPath"
|
Say-Verbose "Zip path: $ZipPath"
|
||||||
|
|
||||||
$DownloadFailed = $false
|
$DownloadSucceeded = $false
|
||||||
|
$DownloadedLink = $null
|
||||||
|
$ErrorMessages = @()
|
||||||
|
|
||||||
$PrimaryDownloadStatusCode = 0
|
foreach ($link in $DownloadLinks)
|
||||||
$LegacyDownloadStatusCode = 0
|
{
|
||||||
|
Say-Verbose "Downloading `"$($link.type)`" link $($link.downloadLink)"
|
||||||
|
|
||||||
$PrimaryDownloadFailedMsg = ""
|
|
||||||
$LegacyDownloadFailedMsg = ""
|
|
||||||
|
|
||||||
Say "Downloading primary link $DownloadLink"
|
|
||||||
try {
|
|
||||||
DownloadFile -Source $DownloadLink -OutPath $ZipPath
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
if ($PSItem.Exception.Data.Contains("StatusCode")) {
|
|
||||||
$PrimaryDownloadStatusCode = $PSItem.Exception.Data["StatusCode"]
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($PSItem.Exception.Data.Contains("ErrorMessage")) {
|
|
||||||
$PrimaryDownloadFailedMsg = $PSItem.Exception.Data["ErrorMessage"]
|
|
||||||
} else {
|
|
||||||
$PrimaryDownloadFailedMsg = $PSItem.Exception.Message
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($PrimaryDownloadStatusCode -eq 404) {
|
|
||||||
Say "The resource at $DownloadLink is not available."
|
|
||||||
} else {
|
|
||||||
Say $PSItem.Exception.Message
|
|
||||||
}
|
|
||||||
|
|
||||||
SafeRemoveFile -Path $ZipPath
|
|
||||||
|
|
||||||
if ($LegacyDownloadLink) {
|
|
||||||
$DownloadLink = $LegacyDownloadLink
|
|
||||||
$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
|
|
||||||
Say-Verbose "Legacy zip path: $ZipPath"
|
|
||||||
Say "Downloading legacy link $DownloadLink"
|
|
||||||
try {
|
try {
|
||||||
DownloadFile -Source $DownloadLink -OutPath $ZipPath
|
DownloadFile -Source $link.downloadLink -OutPath $ZipPath
|
||||||
|
Say-Verbose "Download succeeded."
|
||||||
|
$DownloadSucceeded = $true
|
||||||
|
$DownloadedLink = $link
|
||||||
|
break
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
|
$StatusCode = $null
|
||||||
|
$ErrorMessage = $null
|
||||||
|
|
||||||
if ($PSItem.Exception.Data.Contains("StatusCode")) {
|
if ($PSItem.Exception.Data.Contains("StatusCode")) {
|
||||||
$LegacyDownloadStatusCode = $PSItem.Exception.Data["StatusCode"]
|
$StatusCode = $PSItem.Exception.Data["StatusCode"]
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($PSItem.Exception.Data.Contains("ErrorMessage")) {
|
if ($PSItem.Exception.Data.Contains("ErrorMessage")) {
|
||||||
$LegacyDownloadFailedMsg = $PSItem.Exception.Data["ErrorMessage"]
|
$ErrorMessage = $PSItem.Exception.Data["ErrorMessage"]
|
||||||
} else {
|
} else {
|
||||||
$LegacyDownloadFailedMsg = $PSItem.Exception.Message
|
$ErrorMessage = $PSItem.Exception.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($LegacyDownloadStatusCode -eq 404) {
|
Say-Verbose "Download failed with status code $StatusCode. Error message: $ErrorMessage"
|
||||||
Say "The resource at $DownloadLink is not available."
|
$ErrorMessages += "Downloading from `"$($link.type)`" link has failed with error:`nUri: $($link.downloadLink)`nStatusCode: $StatusCode`nError: $ErrorMessage"
|
||||||
} else {
|
|
||||||
Say $PSItem.Exception.Message
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This link failed. Clean up before trying the next one.
|
||||||
SafeRemoveFile -Path $ZipPath
|
SafeRemoveFile -Path $ZipPath
|
||||||
$DownloadFailed = $true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$DownloadFailed = $true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($DownloadFailed) {
|
if (-not $DownloadSucceeded) {
|
||||||
if (($PrimaryDownloadStatusCode -eq 404) -and ((-not $LegacyDownloadLink) -or ($LegacyDownloadStatusCode -eq 404))) {
|
foreach ($ErrorMessage in $ErrorMessages) {
|
||||||
throw "Could not find `"$assetName`" with version = $SpecificVersion`nRefer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support"
|
Say-Error $ErrorMessages
|
||||||
} else {
|
|
||||||
# 404-NotFound is an expected response if it goes from only one of the links, do not show that error.
|
|
||||||
# If primary path is available (not 404-NotFound) then show the primary error else show the legacy error.
|
|
||||||
if ($PrimaryDownloadStatusCode -ne 404) {
|
|
||||||
throw "Could not download `"$assetName`" with version = $SpecificVersion`r`n$PrimaryDownloadFailedMsg"
|
|
||||||
}
|
|
||||||
if (($LegacyDownloadLink) -and ($LegacyDownloadStatusCode -ne 404)) {
|
|
||||||
throw "Could not download `"$assetName`" with version = $SpecificVersion`r`n$LegacyDownloadFailedMsg"
|
|
||||||
}
|
|
||||||
throw "Could not download `"$assetName`" with version = $SpecificVersion"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throw "Could not find `"$assetName`" with version = $($DownloadLinks[0].effectiveVersion)`nRefer to: https://aka.ms/dotnet-os-lifecycle for information on .NET support"
|
||||||
}
|
}
|
||||||
|
|
||||||
Say "Extracting zip from $DownloadLink"
|
Say "Extracting the archive."
|
||||||
Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
|
Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
|
||||||
|
|
||||||
# Check if the SDK version is installed; if not, fail the installation.
|
# Check if the SDK version is installed; if not, fail the installation.
|
||||||
$isAssetInstalled = $false
|
$isAssetInstalled = $false
|
||||||
|
|
||||||
# if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed.
|
# if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed.
|
||||||
if ($SpecificVersion -Match "rtm" -or $SpecificVersion -Match "servicing") {
|
if ($DownloadedLink.effectiveVersion -Match "rtm" -or $DownloadedLink.effectiveVersion -Match "servicing") {
|
||||||
$ReleaseVersion = $SpecificVersion.Split("-")[0]
|
$ReleaseVersion = $DownloadedLink.effectiveVersion.Split("-")[0]
|
||||||
Say-Verbose "Checking installation: version = $ReleaseVersion"
|
Say-Verbose "Checking installation: version = $ReleaseVersion"
|
||||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $ReleaseVersion
|
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $ReleaseVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the SDK version is installed.
|
# Check if the SDK version is installed.
|
||||||
if (!$isAssetInstalled) {
|
if (!$isAssetInstalled) {
|
||||||
Say-Verbose "Checking installation: version = $SpecificVersion"
|
Say-Verbose "Checking installation: version = $($DownloadedLink.effectiveVersion)"
|
||||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
|
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $DownloadedLink.effectiveVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm.
|
# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm.
|
||||||
if (!$isAssetInstalled) {
|
if (!$isAssetInstalled) {
|
||||||
Say-Error "Failed to verify the version of installed `"$assetName`".`nInstallation source: $DownloadLink.`nInstallation location: $InstallRoot.`nReport the bug at https://github.com/dotnet/install-scripts/issues."
|
Say-Error "Failed to verify the version of installed `"$assetName`".`nInstallation source: $($DownloadedLink.downloadLink).`nInstallation location: $InstallRoot.`nReport the bug at https://github.com/dotnet/install-scripts/issues."
|
||||||
throw "`"$assetName`" with version = $SpecificVersion failed to install with an unknown error."
|
throw "`"$assetName`" with version = $($DownloadedLink.effectiveVersion) failed to install with an unknown error."
|
||||||
}
|
}
|
||||||
|
|
||||||
SafeRemoveFile -Path $ZipPath
|
SafeRemoveFile -Path $ZipPath
|
||||||
|
|
||||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
|
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
|
||||||
|
|
||||||
Say "Note that the script does not resolve dependencies during installation."
|
Say "Note that the script does not resolve dependencies during installation."
|
||||||
Say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies"
|
Say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies"
|
||||||
@ -1211,40 +1253,40 @@ Say "Installation finished"
|
|||||||
# SIG # Begin signature block
|
# SIG # Begin signature block
|
||||||
# MIIjhgYJKoZIhvcNAQcCoIIjdzCCI3MCAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
# MIIjhgYJKoZIhvcNAQcCoIIjdzCCI3MCAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
||||||
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
|
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
|
||||||
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDO8obeUp97UA1H
|
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCtQY6W1jK8moyB
|
||||||
# qy3NSLDwxxLLlEbGxeCzMOcKVT/3eKCCDYEwggX/MIID56ADAgECAhMzAAAB32vw
|
# wEDTDVp9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yYf52L+2iVTrda8XW
|
||||||
# Di3jwloF8EWkkHRtSuXlFUbTmwr/lDDgbpZiKhLS7CBTDj32I0L5i532+uHczw82
|
# esPG62Mnn3T8AuLfzeJFuAbfOSERx7IFZO92UPoXE1uEjL5skl1yTZB3MubgOA4F
|
||||||
# oZDmYmYmIUSMbZOgS65h797rj5JJ6OkeEUJoAVwwggd6MIIFYqADAgECAgphDpDS
|
# 8KoRNhviFAEST+nG8c8uIsbZeb08SeYQMqjVEmkwggd6MIIFYqADAgECAgphDpDS
|
||||||
# AAAAAAADMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK
|
# AAAAAAADMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK
|
||||||
# V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0
|
# V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0
|
||||||
# IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0
|
# IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0
|
||||||
@ -1287,21 +1329,21 @@ Say "Installation finished"
|
|||||||
# RcBCyZt2WwqASGv9eZ/BvW1taslScxMNelDNMYIVWzCCFVcCAQEwgZUwfjELMAkG
|
# RcBCyZt2WwqASGv9eZ/BvW1taslScxMNelDNMYIVWzCCFVcCAQEwgZUwfjELMAkG
|
||||||
# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx
|
# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx
|
||||||
# HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3Jhd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3LqT75SCKh/Ds=
|
||||||
# SIG # End signature block
|
# SIG # End signature block
|
||||||
|
543
externals/install-dotnet.sh
vendored
543
externals/install-dotnet.sh
vendored
@ -135,6 +135,31 @@ get_legacy_os_name_from_platform() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_legacy_os_name() {
|
||||||
|
eval $invocation
|
||||||
|
|
||||||
|
local uname=$(uname)
|
||||||
|
if [ "$uname" = "Darwin" ]; then
|
||||||
|
echo "osx"
|
||||||
|
return 0
|
||||||
|
elif [ -n "$runtime_id" ]; then
|
||||||
|
echo $(get_legacy_os_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}")
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
if [ -e /etc/os-release ]; then
|
||||||
|
. /etc/os-release
|
||||||
|
os=$(get_legacy_os_name_from_platform "$ID${VERSION_ID:+.${VERSION_ID}}" || echo "")
|
||||||
|
if [ -n "$os" ]; then
|
||||||
|
echo "$os"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
say_verbose "Distribution specific OS name and version could not be detected: UName = $uname"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
get_linux_platform_name() {
|
get_linux_platform_name() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
@ -174,8 +199,8 @@ get_current_os_name() {
|
|||||||
echo "freebsd"
|
echo "freebsd"
|
||||||
return 0
|
return 0
|
||||||
elif [ "$uname" = "Linux" ]; then
|
elif [ "$uname" = "Linux" ]; then
|
||||||
local linux_platform_name
|
local linux_platform_name=""
|
||||||
linux_platform_name="$(get_linux_platform_name)" || { echo "linux" && return 0 ; }
|
linux_platform_name="$(get_linux_platform_name)" || true
|
||||||
|
|
||||||
if [ "$linux_platform_name" = "rhel.6" ]; then
|
if [ "$linux_platform_name" = "rhel.6" ]; then
|
||||||
echo $linux_platform_name
|
echo $linux_platform_name
|
||||||
@ -196,31 +221,6 @@ get_current_os_name() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
get_legacy_os_name() {
|
|
||||||
eval $invocation
|
|
||||||
|
|
||||||
local uname=$(uname)
|
|
||||||
if [ "$uname" = "Darwin" ]; then
|
|
||||||
echo "osx"
|
|
||||||
return 0
|
|
||||||
elif [ -n "$runtime_id" ]; then
|
|
||||||
echo $(get_legacy_os_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}")
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
if [ -e /etc/os-release ]; then
|
|
||||||
. /etc/os-release
|
|
||||||
os=$(get_legacy_os_name_from_platform "$ID${VERSION_ID:+.${VERSION_ID}}" || echo "")
|
|
||||||
if [ -n "$os" ]; then
|
|
||||||
echo "$os"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
say_verbose "Distribution specific OS name and version could not be detected: UName = $uname"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
machine_has() {
|
machine_has() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
@ -228,7 +228,6 @@ machine_has() {
|
|||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
check_min_reqs() {
|
check_min_reqs() {
|
||||||
local hasMinimum=false
|
local hasMinimum=false
|
||||||
if machine_has "curl"; then
|
if machine_has "curl"; then
|
||||||
@ -321,11 +320,13 @@ get_normalized_architecture_from_architecture() {
|
|||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
local architecture="$(to_lowercase "$1")"
|
local architecture="$(to_lowercase "$1")"
|
||||||
case "$architecture" in
|
|
||||||
\<auto\>)
|
if [[ $architecture == \<auto\> ]]; then
|
||||||
echo "$(get_normalized_architecture_from_architecture "$(get_machine_architecture)")"
|
echo "$(get_machine_architecture)"
|
||||||
return 0
|
return 0
|
||||||
;;
|
fi
|
||||||
|
|
||||||
|
case "$architecture" in
|
||||||
amd64|x64)
|
amd64|x64)
|
||||||
echo "x64"
|
echo "x64"
|
||||||
return 0
|
return 0
|
||||||
@ -425,6 +426,7 @@ get_normalized_channel() {
|
|||||||
get_normalized_product() {
|
get_normalized_product() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
|
local product=""
|
||||||
local runtime="$(to_lowercase "$1")"
|
local runtime="$(to_lowercase "$1")"
|
||||||
if [[ "$runtime" == "dotnet" ]]; then
|
if [[ "$runtime" == "dotnet" ]]; then
|
||||||
product="dotnet-runtime"
|
product="dotnet-runtime"
|
||||||
@ -446,7 +448,7 @@ get_normalized_product() {
|
|||||||
|
|
||||||
# args:
|
# args:
|
||||||
# version_text - stdin
|
# version_text - stdin
|
||||||
get_version_from_version_info() {
|
get_version_from_latestversion_file_content() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
cat | tail -n 1 | sed 's/\r$//'
|
cat | tail -n 1 | sed 's/\r$//'
|
||||||
@ -478,7 +480,7 @@ is_dotnet_package_installed() {
|
|||||||
# azure_feed - $1
|
# azure_feed - $1
|
||||||
# channel - $2
|
# channel - $2
|
||||||
# normalized_architecture - $3
|
# normalized_architecture - $3
|
||||||
get_latest_version_info() {
|
get_version_from_latestversion_file() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
local azure_feed="$1"
|
local azure_feed="$1"
|
||||||
@ -487,24 +489,24 @@ get_latest_version_info() {
|
|||||||
|
|
||||||
local version_file_url=null
|
local version_file_url=null
|
||||||
if [[ "$runtime" == "dotnet" ]]; then
|
if [[ "$runtime" == "dotnet" ]]; then
|
||||||
version_file_url="$uncached_feed/Runtime/$channel/latest.version"
|
version_file_url="$azure_feed/Runtime/$channel/latest.version"
|
||||||
elif [[ "$runtime" == "aspnetcore" ]]; then
|
elif [[ "$runtime" == "aspnetcore" ]]; then
|
||||||
version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version"
|
version_file_url="$azure_feed/aspnetcore/Runtime/$channel/latest.version"
|
||||||
elif [ -z "$runtime" ]; then
|
elif [ -z "$runtime" ]; then
|
||||||
version_file_url="$uncached_feed/Sdk/$channel/latest.version"
|
version_file_url="$azure_feed/Sdk/$channel/latest.version"
|
||||||
else
|
else
|
||||||
say_err "Invalid value for \$runtime"
|
say_err "Invalid value for \$runtime"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
say_verbose "get_latest_version_info: latest url: $version_file_url"
|
say_verbose "get_version_from_latestversion_file: latest url: $version_file_url"
|
||||||
|
|
||||||
download "$version_file_url"
|
download "$version_file_url" || return $?
|
||||||
return $?
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# args:
|
# args:
|
||||||
# json_file - $1
|
# json_file - $1
|
||||||
parse_jsonfile_for_version() {
|
parse_globaljson_file_for_version() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
local json_file="$1"
|
local json_file="$1"
|
||||||
@ -560,9 +562,9 @@ get_specific_version_from_version() {
|
|||||||
if [ -z "$json_file" ]; then
|
if [ -z "$json_file" ]; then
|
||||||
if [[ "$version" == "latest" ]]; then
|
if [[ "$version" == "latest" ]]; then
|
||||||
local version_info
|
local version_info
|
||||||
version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1
|
version_info="$(get_version_from_latestversion_file "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1
|
||||||
say_verbose "get_specific_version_from_version: version_info=$version_info"
|
say_verbose "get_specific_version_from_version: version_info=$version_info"
|
||||||
echo "$version_info" | get_version_from_version_info
|
echo "$version_info" | get_version_from_latestversion_file_content
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "$version"
|
echo "$version"
|
||||||
@ -570,7 +572,7 @@ get_specific_version_from_version() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
local version_info
|
local version_info
|
||||||
version_info="$(parse_jsonfile_for_version "$json_file")" || return 1
|
version_info="$(parse_globaljson_file_for_version "$json_file")" || return 1
|
||||||
echo "$version_info"
|
echo "$version_info"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -635,14 +637,14 @@ get_specific_product_version() {
|
|||||||
|
|
||||||
if machine_has "curl"
|
if machine_has "curl"
|
||||||
then
|
then
|
||||||
specific_product_version=$(curl -s --fail "${download_link}${feed_credential}")
|
specific_product_version=$(curl -s --fail "${download_link}${feed_credential}" 2>&1)
|
||||||
if [ $? = 0 ]; then
|
if [ $? = 0 ]; then
|
||||||
echo "${specific_product_version//[$'\t\r\n']}"
|
echo "${specific_product_version//[$'\t\r\n']}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
elif machine_has "wget"
|
elif machine_has "wget"
|
||||||
then
|
then
|
||||||
specific_product_version=$(wget -qO- "${download_link}${feed_credential}")
|
specific_product_version=$(wget -qO- "${download_link}${feed_credential}" 2>&1)
|
||||||
if [ $? = 0 ]; then
|
if [ $? = 0 ]; then
|
||||||
echo "${specific_product_version//[$'\t\r\n']}"
|
echo "${specific_product_version//[$'\t\r\n']}"
|
||||||
return 0
|
return 0
|
||||||
@ -907,7 +909,7 @@ get_http_header_curl() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
curl_options="-I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 "
|
curl_options="-I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 "
|
||||||
curl $curl_options "$remote_path_with_credential" || return 1
|
curl $curl_options "$remote_path_with_credential" 2>&1 || return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -918,15 +920,26 @@ get_http_header_wget() {
|
|||||||
eval $invocation
|
eval $invocation
|
||||||
local remote_path="$1"
|
local remote_path="$1"
|
||||||
local disable_feed_credential="$2"
|
local disable_feed_credential="$2"
|
||||||
|
local wget_options="-q -S --spider --tries 5 "
|
||||||
|
# Store options that aren't supported on all wget implementations separately.
|
||||||
|
local wget_options_extra="--waitretry 2 --connect-timeout 15 "
|
||||||
|
local wget_result=''
|
||||||
|
|
||||||
remote_path_with_credential="$remote_path"
|
remote_path_with_credential="$remote_path"
|
||||||
if [ "$disable_feed_credential" = false ]; then
|
if [ "$disable_feed_credential" = false ]; then
|
||||||
remote_path_with_credential+="$feed_credential"
|
remote_path_with_credential+="$feed_credential"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wget_options="-q -S --spider --tries 5 --waitretry 2 --connect-timeout 15 "
|
wget $wget_options $wget_options_extra "$remote_path_with_credential" 2>&1
|
||||||
wget $wget_options "$remote_path_with_credential" 2>&1 || return 1
|
wget_result=$?
|
||||||
return 0
|
|
||||||
|
if [[ $wget_result == 2 ]]; then
|
||||||
|
# Parsing of the command has failed. Exclude potentially unrecognized options and retry.
|
||||||
|
wget $wget_options "$remote_path_with_credential" 2>&1
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
return $wget_result
|
||||||
}
|
}
|
||||||
|
|
||||||
# args:
|
# args:
|
||||||
@ -988,9 +1001,9 @@ downloadcurl() {
|
|||||||
local curl_options="--retry 20 --retry-delay 2 --connect-timeout 15 -sSL -f --create-dirs "
|
local curl_options="--retry 20 --retry-delay 2 --connect-timeout 15 -sSL -f --create-dirs "
|
||||||
local failed=false
|
local failed=false
|
||||||
if [ -z "$out_path" ]; then
|
if [ -z "$out_path" ]; then
|
||||||
curl $curl_options "$remote_path_with_credential" || failed=true
|
curl $curl_options "$remote_path_with_credential" 2>&1 || failed=true
|
||||||
else
|
else
|
||||||
curl $curl_options -o "$out_path" "$remote_path_with_credential" || failed=true
|
curl $curl_options -o "$out_path" "$remote_path_with_credential" 2>&1 || failed=true
|
||||||
fi
|
fi
|
||||||
if [ "$failed" = true ]; then
|
if [ "$failed" = true ]; then
|
||||||
local disable_feed_credential=false
|
local disable_feed_credential=false
|
||||||
@ -1016,14 +1029,31 @@ downloadwget() {
|
|||||||
local out_path="${2:-}"
|
local out_path="${2:-}"
|
||||||
# Append feed_credential as late as possible before calling wget to avoid logging feed_credential
|
# Append feed_credential as late as possible before calling wget to avoid logging feed_credential
|
||||||
local remote_path_with_credential="${remote_path}${feed_credential}"
|
local remote_path_with_credential="${remote_path}${feed_credential}"
|
||||||
local wget_options="--tries 20 --waitretry 2 --connect-timeout 15 "
|
local wget_options="--tries 20 "
|
||||||
local failed=false
|
# Store options that aren't supported on all wget implementations separately.
|
||||||
|
local wget_options_extra="--waitretry 2 --connect-timeout 15 "
|
||||||
|
local wget_result=''
|
||||||
|
|
||||||
if [ -z "$out_path" ]; then
|
if [ -z "$out_path" ]; then
|
||||||
wget -q $wget_options -O - "$remote_path_with_credential" || failed=true
|
wget -q $wget_options $wget_options_extra -O - "$remote_path_with_credential" 2>&1
|
||||||
|
wget_result=$?
|
||||||
else
|
else
|
||||||
wget $wget_options -O "$out_path" "$remote_path_with_credential" || failed=true
|
wget $wget_options $wget_options_extra -O "$out_path" "$remote_path_with_credential" 2>&1
|
||||||
|
wget_result=$?
|
||||||
fi
|
fi
|
||||||
if [ "$failed" = true ]; then
|
|
||||||
|
if [[ $wget_result == 2 ]]; then
|
||||||
|
# Parsing of the command has failed. Exclude potentially unrecognized options and retry.
|
||||||
|
if [ -z "$out_path" ]; then
|
||||||
|
wget -q $wget_options -O - "$remote_path_with_credential" 2>&1
|
||||||
|
wget_result=$?
|
||||||
|
else
|
||||||
|
wget $wget_options -O "$out_path" "$remote_path_with_credential" 2>&1
|
||||||
|
wget_result=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $wget_result != 0 ]]; then
|
||||||
local disable_feed_credential=false
|
local disable_feed_credential=false
|
||||||
local response=$(get_http_header_wget $remote_path $disable_feed_credential)
|
local response=$(get_http_header_wget $remote_path $disable_feed_credential)
|
||||||
http_code=$( echo "$response" | awk '/^ HTTP/{print $2}' | tail -1 )
|
http_code=$( echo "$response" | awk '/^ HTTP/{print $2}' | tail -1 )
|
||||||
@ -1034,6 +1064,7 @@ downloadwget() {
|
|||||||
say_verbose "$download_error_msg"
|
say_verbose "$download_error_msg"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1090,11 +1121,197 @@ get_download_link_from_aka_ms() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_feeds_to_use()
|
||||||
|
{
|
||||||
|
feeds=(
|
||||||
|
"https://dotnetcli.azureedge.net/dotnet"
|
||||||
|
"https://dotnetbuilds.azureedge.net/public"
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ -n "$azure_feed" ]]; then
|
||||||
|
feeds=("$azure_feed")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$no_cdn" == "true" ]]; then
|
||||||
|
feeds=(
|
||||||
|
"https://dotnetcli.blob.core.windows.net/dotnet"
|
||||||
|
"https://dotnetbuilds.blob.core.windows.net/public"
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ -n "$uncached_feed" ]]; then
|
||||||
|
feeds=("$uncached_feed")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# THIS FUNCTION MAY EXIT (if the determined version is already installed).
|
||||||
|
generate_download_links() {
|
||||||
|
|
||||||
|
download_links=()
|
||||||
|
specific_versions=()
|
||||||
|
effective_versions=()
|
||||||
|
link_types=()
|
||||||
|
|
||||||
|
# If generate_akams_links returns false, no fallback to old links. Just terminate.
|
||||||
|
# This function may also 'exit' (if the determined version is already installed).
|
||||||
|
generate_akams_links || return
|
||||||
|
|
||||||
|
# Check other feeds only if we haven't been able to find an aka.ms link.
|
||||||
|
if [[ "${#download_links[@]}" -lt 1 ]]; then
|
||||||
|
for feed in ${feeds[@]}
|
||||||
|
do
|
||||||
|
# generate_regular_links may also 'exit' (if the determined version is already installed).
|
||||||
|
generate_regular_links $feed || return
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${#download_links[@]}" -eq 0 ]]; then
|
||||||
|
say_err "Failed to resolve the exact version number."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
say_verbose "Generated ${#download_links[@]} links."
|
||||||
|
for link_index in ${!download_links[@]}
|
||||||
|
do
|
||||||
|
say_verbose "Link $link_index: ${link_types[$link_index]}, ${effective_versions[$link_index]}, ${download_links[$link_index]}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# THIS FUNCTION MAY EXIT (if the determined version is already installed).
|
||||||
|
generate_akams_links() {
|
||||||
|
local valid_aka_ms_link=true;
|
||||||
|
|
||||||
|
normalized_version="$(to_lowercase "$version")"
|
||||||
|
if [[ -n "$json_file" || "$normalized_version" != "latest" ]]; then
|
||||||
|
# aka.ms links are not needed when exact version is specified via command or json file
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
get_download_link_from_aka_ms || valid_aka_ms_link=false
|
||||||
|
|
||||||
|
if [[ "$valid_aka_ms_link" == true ]]; then
|
||||||
|
say_verbose "Retrieved primary payload URL from aka.ms link: '$aka_ms_download_link'."
|
||||||
|
say_verbose "Downloading using legacy url will not be attempted."
|
||||||
|
|
||||||
|
download_link=$aka_ms_download_link
|
||||||
|
|
||||||
|
#get version from the path
|
||||||
|
IFS='/'
|
||||||
|
read -ra pathElems <<< "$download_link"
|
||||||
|
count=${#pathElems[@]}
|
||||||
|
specific_version="${pathElems[count-2]}"
|
||||||
|
unset IFS;
|
||||||
|
say_verbose "Version: '$specific_version'."
|
||||||
|
|
||||||
|
#Retrieve effective version
|
||||||
|
effective_version="$(get_specific_product_version "$azure_feed" "$specific_version" "$download_link")"
|
||||||
|
|
||||||
|
# Add link info to arrays
|
||||||
|
download_links+=($download_link)
|
||||||
|
specific_versions+=($specific_version)
|
||||||
|
effective_versions+=($effective_version)
|
||||||
|
link_types+=("aka.ms")
|
||||||
|
|
||||||
|
# Check if the SDK version is already installed.
|
||||||
|
if [[ "$dry_run" != true ]] && is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then
|
||||||
|
say "$asset_name with version '$effective_version' is already installed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if quality is specified - exit with error - there is no fallback approach
|
||||||
|
if [ ! -z "$normalized_quality" ]; then
|
||||||
|
say_err "Failed to locate the latest version in the channel '$normalized_channel' with '$normalized_quality' quality for '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'."
|
||||||
|
say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
say_verbose "Falling back to latest.version file approach."
|
||||||
|
}
|
||||||
|
|
||||||
|
# THIS FUNCTION MAY EXIT (if the determined version is already installed)
|
||||||
|
# args:
|
||||||
|
# feed - $1
|
||||||
|
generate_regular_links() {
|
||||||
|
local feed="$1"
|
||||||
|
local valid_legacy_download_link=true
|
||||||
|
|
||||||
|
specific_version=$(get_specific_version_from_version "$feed" "$channel" "$normalized_architecture" "$version" "$json_file") || specific_version='0'
|
||||||
|
|
||||||
|
if [[ "$specific_version" == '0' ]]; then
|
||||||
|
say_verbose "Failed to resolve the specific version number using feed '$feed'"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
effective_version="$(get_specific_product_version "$feed" "$specific_version")"
|
||||||
|
say_verbose "specific_version=$specific_version"
|
||||||
|
|
||||||
|
download_link="$(construct_download_link "$feed" "$channel" "$normalized_architecture" "$specific_version" "$normalized_os")"
|
||||||
|
say_verbose "Constructed primary named payload URL: $download_link"
|
||||||
|
|
||||||
|
# Add link info to arrays
|
||||||
|
download_links+=($download_link)
|
||||||
|
specific_versions+=($specific_version)
|
||||||
|
effective_versions+=($effective_version)
|
||||||
|
link_types+=("primary")
|
||||||
|
|
||||||
|
legacy_download_link="$(construct_legacy_download_link "$feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false
|
||||||
|
|
||||||
|
if [ "$valid_legacy_download_link" = true ]; then
|
||||||
|
say_verbose "Constructed legacy named payload URL: $legacy_download_link"
|
||||||
|
|
||||||
|
download_links+=($legacy_download_link)
|
||||||
|
specific_versions+=($specific_version)
|
||||||
|
effective_versions+=($effective_version)
|
||||||
|
link_types+=("legacy")
|
||||||
|
else
|
||||||
|
legacy_download_link=""
|
||||||
|
say_verbose "Cound not construct a legacy_download_link; omitting..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if the SDK version is already installed.
|
||||||
|
if [[ "$dry_run" != true ]] && is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then
|
||||||
|
say "$asset_name with version '$effective_version' is already installed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
print_dry_run() {
|
||||||
|
|
||||||
|
say "Payload URLs:"
|
||||||
|
|
||||||
|
for link_index in "${!download_links[@]}"
|
||||||
|
do
|
||||||
|
say "URL #$link_index - ${link_types[$link_index]}: ${download_links[$link_index]}"
|
||||||
|
done
|
||||||
|
|
||||||
|
resolved_version=${specific_versions[0]}
|
||||||
|
repeatable_command="./$script_name --version "\""$resolved_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\"""
|
||||||
|
|
||||||
|
if [ ! -z "$normalized_quality" ]; then
|
||||||
|
repeatable_command+=" --quality "\""$normalized_quality"\"""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$runtime" == "dotnet" ]]; then
|
||||||
|
repeatable_command+=" --runtime "\""dotnet"\"""
|
||||||
|
elif [[ "$runtime" == "aspnetcore" ]]; then
|
||||||
|
repeatable_command+=" --runtime "\""aspnetcore"\"""
|
||||||
|
fi
|
||||||
|
|
||||||
|
repeatable_command+="$non_dynamic_parameters"
|
||||||
|
|
||||||
|
if [ -n "$feed_credential" ]; then
|
||||||
|
repeatable_command+=" --feed-credential "\""<feed_credential>"\"""
|
||||||
|
fi
|
||||||
|
|
||||||
|
say "Repeatable invocation: $repeatable_command"
|
||||||
|
}
|
||||||
|
|
||||||
calculate_vars() {
|
calculate_vars() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
valid_legacy_download_link=true
|
|
||||||
|
|
||||||
#normalize input variables
|
script_name=$(basename "$0")
|
||||||
normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")"
|
normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")"
|
||||||
say_verbose "Normalized architecture: '$normalized_architecture'."
|
say_verbose "Normalized architecture: '$normalized_architecture'."
|
||||||
normalized_os="$(get_normalized_os "$user_defined_os")"
|
normalized_os="$(get_normalized_os "$user_defined_os")"
|
||||||
@ -1105,76 +1322,8 @@ calculate_vars() {
|
|||||||
say_verbose "Normalized channel: '$normalized_channel'."
|
say_verbose "Normalized channel: '$normalized_channel'."
|
||||||
normalized_product="$(get_normalized_product "$runtime")"
|
normalized_product="$(get_normalized_product "$runtime")"
|
||||||
say_verbose "Normalized product: '$normalized_product'."
|
say_verbose "Normalized product: '$normalized_product'."
|
||||||
|
|
||||||
#try to get download location from aka.ms link
|
|
||||||
#not applicable when exact version is specified via command or json file
|
|
||||||
normalized_version="$(to_lowercase "$version")"
|
|
||||||
if [[ -z "$json_file" && "$normalized_version" == "latest" ]]; then
|
|
||||||
|
|
||||||
valid_aka_ms_link=true;
|
|
||||||
get_download_link_from_aka_ms || valid_aka_ms_link=false
|
|
||||||
|
|
||||||
if [ "$valid_aka_ms_link" == false ]; then
|
|
||||||
# if quality is specified - exit with error - there is no fallback approach
|
|
||||||
if [ ! -z "$normalized_quality" ]; then
|
|
||||||
say_err "Failed to locate the latest version in the channel '$normalized_channel' with '$normalized_quality' quality for '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'."
|
|
||||||
say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
say_verbose "Falling back to latest.version file approach."
|
|
||||||
else
|
|
||||||
say_verbose "Retrieved primary payload URL from aka.ms link: '$aka_ms_download_link'."
|
|
||||||
download_link=$aka_ms_download_link
|
|
||||||
|
|
||||||
say_verbose "Downloading using legacy url will not be attempted."
|
|
||||||
valid_legacy_download_link=false
|
|
||||||
|
|
||||||
#get version from the path
|
|
||||||
IFS='/'
|
|
||||||
read -ra pathElems <<< "$download_link"
|
|
||||||
count=${#pathElems[@]}
|
|
||||||
specific_version="${pathElems[count-2]}"
|
|
||||||
unset IFS;
|
|
||||||
say_verbose "Version: '$specific_version'."
|
|
||||||
|
|
||||||
#Retrieve product specific version
|
|
||||||
specific_product_version="$(get_specific_product_version "$azure_feed" "$specific_version" "$download_link")"
|
|
||||||
say_verbose "Product specific version: '$specific_product_version'."
|
|
||||||
|
|
||||||
install_root="$(resolve_installation_path "$install_dir")"
|
install_root="$(resolve_installation_path "$install_dir")"
|
||||||
say_verbose "InstallRoot: '$install_root'."
|
say_verbose "InstallRoot: '$install_root'."
|
||||||
return
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version" "$json_file")"
|
|
||||||
specific_product_version="$(get_specific_product_version "$azure_feed" "$specific_version")"
|
|
||||||
say_verbose "specific_version=$specific_version"
|
|
||||||
if [ -z "$specific_version" ]; then
|
|
||||||
say_err "Could not resolve version information."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version" "$normalized_os")"
|
|
||||||
say_verbose "Constructed primary named payload URL: $download_link"
|
|
||||||
|
|
||||||
legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false
|
|
||||||
|
|
||||||
if [ "$valid_legacy_download_link" = true ]; then
|
|
||||||
say_verbose "Constructed legacy named payload URL: $legacy_download_link"
|
|
||||||
else
|
|
||||||
say_verbose "Cound not construct a legacy_download_link; omitting..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
install_root="$(resolve_installation_path "$install_dir")"
|
|
||||||
say_verbose "InstallRoot: $install_root"
|
|
||||||
}
|
|
||||||
|
|
||||||
install_dotnet() {
|
|
||||||
eval $invocation
|
|
||||||
local download_failed=false
|
|
||||||
local asset_name=''
|
|
||||||
local asset_relative_path=''
|
|
||||||
|
|
||||||
if [[ "$runtime" == "dotnet" ]]; then
|
if [[ "$runtime" == "dotnet" ]]; then
|
||||||
asset_relative_path="shared/Microsoft.NETCore.App"
|
asset_relative_path="shared/Microsoft.NETCore.App"
|
||||||
@ -1185,84 +1334,52 @@ install_dotnet() {
|
|||||||
elif [ -z "$runtime" ]; then
|
elif [ -z "$runtime" ]; then
|
||||||
asset_relative_path="sdk"
|
asset_relative_path="sdk"
|
||||||
asset_name=".NET Core SDK"
|
asset_name=".NET Core SDK"
|
||||||
else
|
|
||||||
say_err "Invalid value for \$runtime"
|
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the SDK version is already installed.
|
get_feeds_to_use
|
||||||
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
|
}
|
||||||
say "$asset_name version $specific_version is already installed."
|
|
||||||
return 0
|
install_dotnet() {
|
||||||
fi
|
eval $invocation
|
||||||
|
local download_failed=false
|
||||||
|
local download_completed=false
|
||||||
|
|
||||||
mkdir -p "$install_root"
|
mkdir -p "$install_root"
|
||||||
zip_path="$(mktemp "$temporary_file_template")"
|
zip_path="$(mktemp "$temporary_file_template")"
|
||||||
say_verbose "Zip path: $zip_path"
|
say_verbose "Zip path: $zip_path"
|
||||||
|
|
||||||
|
for link_index in "${!download_links[@]}"
|
||||||
|
do
|
||||||
|
download_link="${download_links[$link_index]}"
|
||||||
|
specific_version="${specific_versions[$link_index]}"
|
||||||
|
effective_version="${effective_versions[$link_index]}"
|
||||||
|
link_type="${link_types[$link_index]}"
|
||||||
|
|
||||||
# Failures are normal in the non-legacy case for ultimately legacy downloads.
|
say "Attempting to download using $link_type link $download_link"
|
||||||
# Do not output to stderr, since output to stderr is considered an error.
|
|
||||||
say "Downloading primary link $download_link"
|
|
||||||
|
|
||||||
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
||||||
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
|
||||||
|
|
||||||
# if the download fails, download the legacy_download_link
|
|
||||||
if [ "$download_failed" = true ]; then
|
|
||||||
primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg"
|
|
||||||
case $primary_path_http_code in
|
|
||||||
404)
|
|
||||||
say "The resource at $download_link is not available."
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
say "$primary_path_download_error_msg"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
rm -f "$zip_path" 2>&1 && say_verbose "Temporary zip file $zip_path was removed"
|
|
||||||
if [ "$valid_legacy_download_link" = true ]; then
|
|
||||||
download_failed=false
|
download_failed=false
|
||||||
download_link="$legacy_download_link"
|
|
||||||
zip_path="$(mktemp "$temporary_file_template")"
|
|
||||||
say_verbose "Legacy zip path: $zip_path"
|
|
||||||
|
|
||||||
say "Downloading legacy link $download_link"
|
|
||||||
|
|
||||||
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
|
||||||
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
||||||
|
|
||||||
if [ "$download_failed" = true ]; then
|
if [ "$download_failed" = true ]; then
|
||||||
legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg"
|
case $http_code in
|
||||||
case $legacy_path_http_code in
|
|
||||||
404)
|
404)
|
||||||
say "The resource at $download_link is not available."
|
say "The resource at $link_type link '$download_link' is not available."
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
say "$legacy_path_download_error_msg"
|
say "Failed to download $link_type link '$download_link': $download_error_msg"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
rm -f "$zip_path" 2>&1 && say_verbose "Temporary zip file $zip_path was removed"
|
rm -f "$zip_path" 2>&1 && say_verbose "Temporary zip file $zip_path was removed"
|
||||||
|
else
|
||||||
|
download_completed=true
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$download_failed" = true ]; then
|
if [[ "$download_completed" == false ]]; then
|
||||||
if [[ "$primary_path_http_code" = "404" && ( "$valid_legacy_download_link" = false || "$legacy_path_http_code" = "404") ]]; then
|
|
||||||
say_err "Could not find \`$asset_name\` with version = $specific_version"
|
say_err "Could not find \`$asset_name\` with version = $specific_version"
|
||||||
say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support"
|
say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support"
|
||||||
else
|
|
||||||
say_err "Could not download: \`$asset_name\` with version = $specific_version"
|
|
||||||
# 404-NotFound is an expected response if it goes from only one of the links, do not show that error.
|
|
||||||
# If primary path is available (not 404-NotFound) then show the primary error else show the legacy error.
|
|
||||||
if [ "$primary_path_http_code" != "404" ]; then
|
|
||||||
say_err "$primary_path_download_error_msg"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
if [[ "$valid_legacy_download_link" = true && "$legacy_path_http_code" != "404" ]]; then
|
|
||||||
say_err "$legacy_path_download_error_msg"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1283,14 +1400,14 @@ install_dotnet() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the standard SDK version is installed.
|
# Check if the standard SDK version is installed.
|
||||||
say_verbose "Checking installation: version = $specific_product_version"
|
say_verbose "Checking installation: version = $effective_version"
|
||||||
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_product_version"; then
|
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm.
|
# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm.
|
||||||
say_err "Failed to verify the version of installed \`$asset_name\`.\nInstallation source: $download_link.\nInstallation location: $install_root.\nReport the bug at https://github.com/dotnet/install-scripts/issues."
|
say_err "Failed to verify the version of installed \`$asset_name\`.\nInstallation source: $download_link.\nInstallation location: $install_root.\nReport the bug at https://github.com/dotnet/install-scripts/issues."
|
||||||
say_err "\`$asset_name\` with version = $specific_product_version failed to install with an unknown error."
|
say_err "\`$asset_name\` with version = $effective_version failed to install with an error."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1308,8 +1425,8 @@ architecture="<auto>"
|
|||||||
dry_run=false
|
dry_run=false
|
||||||
no_path=false
|
no_path=false
|
||||||
no_cdn=false
|
no_cdn=false
|
||||||
azure_feed="https://dotnetcli.azureedge.net/dotnet"
|
azure_feed=""
|
||||||
uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet"
|
uncached_feed=""
|
||||||
feed_credential=""
|
feed_credential=""
|
||||||
verbose=false
|
verbose=false
|
||||||
runtime=""
|
runtime=""
|
||||||
@ -1434,7 +1551,7 @@ do
|
|||||||
echo " - 3-part version in a format A.B.Cxx - represents a specific SDK release"
|
echo " - 3-part version in a format A.B.Cxx - represents a specific SDK release"
|
||||||
echo " examples: 5.0.1xx, 5.0.2xx."
|
echo " examples: 5.0.1xx, 5.0.2xx."
|
||||||
echo " Supported since 5.0 release"
|
echo " Supported since 5.0 release"
|
||||||
echo " Note: The version parameter overrides the channel parameter when any version other than `latest` is used."
|
echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used."
|
||||||
echo " -v,--version <VERSION> Use specific VERSION, Defaults to \`$version\`."
|
echo " -v,--version <VERSION> Use specific VERSION, Defaults to \`$version\`."
|
||||||
echo " -Version"
|
echo " -Version"
|
||||||
echo " Possible values:"
|
echo " Possible values:"
|
||||||
@ -1447,7 +1564,7 @@ do
|
|||||||
echo " Works only in combination with channel. Not applicable for current and LTS channels and will be ignored if those channels are used."
|
echo " Works only in combination with channel. Not applicable for current and LTS channels and will be ignored if those channels are used."
|
||||||
echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
|
echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
|
||||||
echo " Supported since 5.0 release."
|
echo " Supported since 5.0 release."
|
||||||
echo " Note: The version parameter overrides the channel parameter when any version other than `latest` is used, and therefore overrides the quality."
|
echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used, and therefore overrides the quality."
|
||||||
echo " --internal,-Internal Download internal builds. Requires providing credentials via --feed-credential parameter."
|
echo " --internal,-Internal Download internal builds. Requires providing credentials via --feed-credential parameter."
|
||||||
echo " --feed-credential <FEEDCREDENTIAL> Token to access Azure feed. Used as a query string to append to the Azure feed."
|
echo " --feed-credential <FEEDCREDENTIAL> Token to access Azure feed. Used as a query string to append to the Azure feed."
|
||||||
echo " -FeedCredential This parameter typically is not specified."
|
echo " -FeedCredential This parameter typically is not specified."
|
||||||
@ -1469,8 +1586,12 @@ do
|
|||||||
echo " --dry-run,-DryRun Do not perform installation. Display download link."
|
echo " --dry-run,-DryRun Do not perform installation. Display download link."
|
||||||
echo " --no-path, -NoPath Do not set PATH for the current process."
|
echo " --no-path, -NoPath Do not set PATH for the current process."
|
||||||
echo " --verbose,-Verbose Display diagnostics information."
|
echo " --verbose,-Verbose Display diagnostics information."
|
||||||
echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed, This parameter typically is not changed by the user."
|
echo " --azure-feed,-AzureFeed For internal use only."
|
||||||
echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user."
|
echo " Allows using a different storage to download SDK archives from."
|
||||||
|
echo " This parameter is only used if --no-cdn is false."
|
||||||
|
echo " --uncached-feed,-UncachedFeed For internal use only."
|
||||||
|
echo " Allows using a different storage to download SDK archives from."
|
||||||
|
echo " This parameter is only used if --no-cdn is true."
|
||||||
echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
|
echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
|
||||||
echo " -SkipNonVersionedFiles"
|
echo " -SkipNonVersionedFiles"
|
||||||
echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly."
|
echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly."
|
||||||
@ -1478,14 +1599,6 @@ do
|
|||||||
echo " Note: global.json must have a value for 'SDK:Version'"
|
echo " Note: global.json must have a value for 'SDK:Version'"
|
||||||
echo " -?,--?,-h,--help,-Help Shows this help message"
|
echo " -?,--?,-h,--help,-Help Shows this help message"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Obsolete parameters:"
|
|
||||||
echo " --shared-runtime The recommended alternative is '--runtime dotnet'."
|
|
||||||
echo " This parameter is obsolete and may be removed in a future version of this script."
|
|
||||||
echo " Installs just the shared runtime bits, not the entire SDK."
|
|
||||||
echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
|
|
||||||
echo " -RuntimeId" The parameter is obsolete and may be removed in a future version of this script. Should be used only for versions below 2.1.
|
|
||||||
echo " For primary links to override OS or/and architecture, use --os and --architecture option instead."
|
|
||||||
echo ""
|
|
||||||
echo "Install Location:"
|
echo "Install Location:"
|
||||||
echo " Location is chosen in following order:"
|
echo " Location is chosen in following order:"
|
||||||
echo " - --install-dir option"
|
echo " - --install-dir option"
|
||||||
@ -1502,10 +1615,6 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$no_cdn" = true ]; then
|
|
||||||
azure_feed="$uncached_feed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
||||||
say "- The SDK needs to be installed without user interaction and without admin rights."
|
say "- The SDK needs to be installed without user interaction and without admin rights."
|
||||||
say "- The SDK installation doesn't need to persist across multiple CI runs."
|
say "- The SDK installation doesn't need to persist across multiple CI runs."
|
||||||
@ -1523,33 +1632,11 @@ fi
|
|||||||
|
|
||||||
check_min_reqs
|
check_min_reqs
|
||||||
calculate_vars
|
calculate_vars
|
||||||
script_name=$(basename "$0")
|
# generate_regular_links call below will 'exit' if the determined version is already installed.
|
||||||
|
generate_download_links
|
||||||
|
|
||||||
if [ "$dry_run" = true ]; then
|
if [[ "$dry_run" = true ]]; then
|
||||||
say "Payload URLs:"
|
print_dry_run
|
||||||
say "Primary named payload URL: ${download_link}"
|
|
||||||
if [ "$valid_legacy_download_link" = true ]; then
|
|
||||||
say "Legacy named payload URL: ${legacy_download_link}"
|
|
||||||
fi
|
|
||||||
repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\"""
|
|
||||||
|
|
||||||
if [ ! -z "$normalized_quality" ]; then
|
|
||||||
repeatable_command+=" --quality "\""$normalized_quality"\"""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$runtime" == "dotnet" ]]; then
|
|
||||||
repeatable_command+=" --runtime "\""dotnet"\"""
|
|
||||||
elif [[ "$runtime" == "aspnetcore" ]]; then
|
|
||||||
repeatable_command+=" --runtime "\""aspnetcore"\"""
|
|
||||||
fi
|
|
||||||
|
|
||||||
repeatable_command+="$non_dynamic_parameters"
|
|
||||||
|
|
||||||
if [ -n "$feed_credential" ]; then
|
|
||||||
repeatable_command+=" --feed-credential "\""<feed_credential>"\"""
|
|
||||||
fi
|
|
||||||
|
|
||||||
say "Repeatable invocation: $repeatable_command"
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user