add -SharedRuntime switch support
This commit is contained in:
parent
b2c7140b2a
commit
2a84c13817
2 changed files with 38 additions and 4 deletions
21
scripts/obtain/dotnet-install.ps1
vendored
21
scripts/obtain/dotnet-install.ps1
vendored
|
@ -29,6 +29,9 @@
|
||||||
Default: <auto> - this value represents currently running OS architecture
|
Default: <auto> - this value represents currently running OS architecture
|
||||||
Architecture of dotnet binaries to be installed.
|
Architecture of dotnet binaries to be installed.
|
||||||
Possible values are: <auto>, x64 and x86
|
Possible values are: <auto>, x64 and x86
|
||||||
|
.PARAMETER SharedRuntime
|
||||||
|
Default: false
|
||||||
|
Installs just the shared runtime bits, not the entire SDK
|
||||||
.PARAMETER DebugSymbols
|
.PARAMETER DebugSymbols
|
||||||
If set the installer will include symbols in the installation.
|
If set the installer will include symbols in the installation.
|
||||||
.PARAMETER DryRun
|
.PARAMETER DryRun
|
||||||
|
@ -51,6 +54,7 @@ param(
|
||||||
[string]$Version="Latest",
|
[string]$Version="Latest",
|
||||||
[string]$InstallDir="<auto>",
|
[string]$InstallDir="<auto>",
|
||||||
[string]$Architecture="<auto>",
|
[string]$Architecture="<auto>",
|
||||||
|
[switch]$SharedRuntime,
|
||||||
[switch]$DebugSymbols, # TODO: Switch does not work yet. Symbols zip is not being uploaded yet.
|
[switch]$DebugSymbols, # TODO: Switch does not work yet. Symbols zip is not being uploaded yet.
|
||||||
[switch]$DryRun,
|
[switch]$DryRun,
|
||||||
[switch]$NoPath,
|
[switch]$NoPath,
|
||||||
|
@ -114,7 +118,14 @@ function Get-Version-Info-From-Version-Text([string]$VersionText) {
|
||||||
function Get-Latest-Version-Info([string]$AzureFeed, [string]$AzureChannel, [string]$CLIArchitecture) {
|
function Get-Latest-Version-Info([string]$AzureFeed, [string]$AzureChannel, [string]$CLIArchitecture) {
|
||||||
Say-Invocation $MyInvocation
|
Say-Invocation $MyInvocation
|
||||||
|
|
||||||
$VersionFileUrl = "$AzureFeed/$AzureChannel/dnvm/latest.win.$CLIArchitecture.version"
|
$VersionFileUrl = $null
|
||||||
|
if ($SharedRuntime) {
|
||||||
|
$VersionFileUrl = "$AzureFeed/$AzureChannel/dnvm/latest.sharedfx.win.$CLIArchitecture.version"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$VersionFileUrl = "$AzureFeed/$AzureChannel/dnvm/latest.win.$CLIArchitecture.version"
|
||||||
|
}
|
||||||
|
|
||||||
$Response = Invoke-WebRequest -UseBasicParsing $VersionFileUrl
|
$Response = Invoke-WebRequest -UseBasicParsing $VersionFileUrl
|
||||||
|
|
||||||
switch ($Response.Headers.'Content-Type'){
|
switch ($Response.Headers.'Content-Type'){
|
||||||
|
@ -160,7 +171,13 @@ function Get-Download-Links([string]$AzureFeed, [string]$AzureChannel, [string]$
|
||||||
Say-Invocation $MyInvocation
|
Say-Invocation $MyInvocation
|
||||||
|
|
||||||
$ret = @()
|
$ret = @()
|
||||||
$files = @("dotnet-dev")
|
$files = @()
|
||||||
|
if ($SharedRuntime) {
|
||||||
|
$files += "dotnet";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$files += "dotnet-dev";
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($file in $files) {
|
foreach ($file in $files) {
|
||||||
$PayloadURL = "$AzureFeed/$AzureChannel/Binaries/$SpecificVersion/$file-win-$CLIArchitecture.$SpecificVersion.zip"
|
$PayloadURL = "$AzureFeed/$AzureChannel/Binaries/$SpecificVersion/$file-win-$CLIArchitecture.$SpecificVersion.zip"
|
||||||
|
|
21
scripts/obtain/dotnet-install.sh
vendored
21
scripts/obtain/dotnet-install.sh
vendored
|
@ -269,7 +269,12 @@ get_latest_version_info() {
|
||||||
|
|
||||||
local osname=$(get_current_os_name)
|
local osname=$(get_current_os_name)
|
||||||
|
|
||||||
local version_file_url="$azure_feed/$azure_channel/dnvm/latest.$osname.$normalized_architecture.version"
|
local version_file_url=null
|
||||||
|
if [ "$shared_runtime" = true ]; then
|
||||||
|
version_file_url="$azure_feed/$azure_channel/dnvm/latest.sharedfx.$osname.$normalized_architecture.version"
|
||||||
|
else
|
||||||
|
version_file_url="$azure_feed/$azure_channel/dnvm/latest.$osname.$normalized_architecture.version"
|
||||||
|
fi
|
||||||
say_verbose "get_latest_version_info: latest url: $version_file_url"
|
say_verbose "get_latest_version_info: latest url: $version_file_url"
|
||||||
|
|
||||||
download $version_file_url
|
download $version_file_url
|
||||||
|
@ -350,7 +355,13 @@ construct_download_link() {
|
||||||
|
|
||||||
local osname=$(get_current_os_name)
|
local osname=$(get_current_os_name)
|
||||||
|
|
||||||
local download_link="$azure_feed/$azure_channel/Binaries/$specific_version/dotnet-dev-$osname-$normalized_architecture.$specific_version.tar.gz"
|
local download_link=null
|
||||||
|
if [ "$shared_runtime" = true ]; then
|
||||||
|
download_link="$azure_feed/$azure_channel/Binaries/$specific_version/dotnet-$osname-$normalized_architecture.$specific_version.tar.gz"
|
||||||
|
else
|
||||||
|
download_link="$azure_feed/$azure_channel/Binaries/$specific_version/dotnet-dev-$osname-$normalized_architecture.$specific_version.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$download_link"
|
echo "$download_link"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -540,6 +551,7 @@ dry_run=false
|
||||||
no_path=false
|
no_path=false
|
||||||
azure_feed="https://dotnetcli.blob.core.windows.net/dotnet"
|
azure_feed="https://dotnetcli.blob.core.windows.net/dotnet"
|
||||||
verbose=false
|
verbose=false
|
||||||
|
shared_runtime=false
|
||||||
|
|
||||||
while [ $# -ne 0 ]
|
while [ $# -ne 0 ]
|
||||||
do
|
do
|
||||||
|
@ -561,6 +573,9 @@ do
|
||||||
shift
|
shift
|
||||||
architecture="$1"
|
architecture="$1"
|
||||||
;;
|
;;
|
||||||
|
--shared-runtime|-[Ss]hared[Rr]untime)
|
||||||
|
shared_runtime=true
|
||||||
|
;;
|
||||||
--debug-symbols|-[Dd]ebug[Ss]ymbols)
|
--debug-symbols|-[Dd]ebug[Ss]ymbols)
|
||||||
debug_symbols=true
|
debug_symbols=true
|
||||||
;;
|
;;
|
||||||
|
@ -594,6 +609,8 @@ do
|
||||||
echo " -InstallDir"
|
echo " -InstallDir"
|
||||||
echo " --architecture <ARCHITECTURE> Architecture of .NET Tools. Currently only x64 is supported."
|
echo " --architecture <ARCHITECTURE> Architecture of .NET Tools. Currently only x64 is supported."
|
||||||
echo " --arch,-Architecture,-Arch"
|
echo " --arch,-Architecture,-Arch"
|
||||||
|
echo " --shared-runtime Installs just the shared runtime bits, not the entire SDK."
|
||||||
|
echo " -SharedRuntime"
|
||||||
echo " --debug-symbols,-DebugSymbols Specifies if symbols should be included in the installation."
|
echo " --debug-symbols,-DebugSymbols Specifies if symbols should be included in the installation."
|
||||||
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."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue