diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1 index 3fd905164..5f2f975a9 100644 --- a/scripts/obtain/dotnet-install.ps1 +++ b/scripts/obtain/dotnet-install.ps1 @@ -47,7 +47,7 @@ #> [cmdletbinding()] param( - [string]$Channel="preview", + [string]$Channel="beta", [string]$Version="Latest", [string]$InstallDir="", [string]$Architecture="", @@ -130,7 +130,8 @@ function Get-Azure-Channel-From-Channel([string]$Channel) { # For compatibility with build scripts accept also directly Azure channels names switch ($Channel.ToLower()) { { ($_ -eq "future") -or ($_ -eq "dev") } { return "dev" } - { ($_ -eq "preview") -or ($_ -eq "beta") } { return "beta" } + { ($_ -eq "beta") } { return "beta" } + { ($_ -eq "preview") } { return "preview" } { $_ -eq "production" } { throw "Production channel does not exist yet" } default { throw "``$Channel`` is an invalid channel name. Use one of the following: ``future``, ``preview``, ``production``" } } diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index b952261ff..5681beddc 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -288,10 +288,14 @@ get_azure_channel_from_channel() { echo "dev" return 0 ;; - preview|beta) + beta) echo "beta" return 0 ;; + preview) + echo "preview" + return 0 + ;; production) say_err "Production channel does not exist yet" return 1 @@ -528,7 +532,7 @@ local_version_file_relative_path="/.version" bin_folder_relative_path="" temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX" -channel="preview" +channel="beta" version="Latest" install_dir="" architecture="" diff --git a/scripts/obtain/install.ps1 b/scripts/obtain/install.ps1 index 8b0ac72d9..5f2f975a9 100644 --- a/scripts/obtain/install.ps1 +++ b/scripts/obtain/install.ps1 @@ -47,7 +47,7 @@ #> [cmdletbinding()] param( - [string]$Channel="preview", + [string]$Channel="beta", [string]$Version="Latest", [string]$InstallDir="", [string]$Architecture="", @@ -68,11 +68,11 @@ $VersionRegEx="/\d+\.\d+[^/]+/" $OverrideNonVersionedFiles=$true function Say($str) { - Write-Host "dotnet_install: $str" + Write-Host "dotnet-install: $str" } function Say-Verbose($str) { - Write-Verbose "dotnet_install: $str" + Write-Verbose "dotnet-install: $str" } function Say-Invocation($Invocation) { @@ -130,7 +130,8 @@ function Get-Azure-Channel-From-Channel([string]$Channel) { # For compatibility with build scripts accept also directly Azure channels names switch ($Channel.ToLower()) { { ($_ -eq "future") -or ($_ -eq "dev") } { return "dev" } - { ($_ -eq "preview") -or ($_ -eq "beta") } { return "beta" } + { ($_ -eq "beta") } { return "beta" } + { ($_ -eq "preview") } { return "preview" } { $_ -eq "production" } { throw "Production channel does not exist yet" } default { throw "``$Channel`` is an invalid channel name. Use one of the following: ``future``, ``preview``, ``production``" } } diff --git a/scripts/obtain/install.sh b/scripts/obtain/install.sh index cc8a832e6..5681beddc 100755 --- a/scripts/obtain/install.sh +++ b/scripts/obtain/install.sh @@ -47,7 +47,7 @@ say_err() { say() { # using stream 3 (defined in the beginning) to not interfere with stdout of functions # which may be used as return value - printf "%b\n" "${cyan:-}dotnet_install:${normal:-} $1" >&3 + printf "%b\n" "${cyan:-}dotnet-install:${normal:-} $1" >&3 } say_verbose() { @@ -245,7 +245,7 @@ is_dotnet_package_installed() { local install_root=$1 local relative_path_to_package=$2 - local specific_version=$3 + local specific_version=${3//[$'\t\r\n']} local dotnet_package_path=$(combine_paths $(combine_paths $install_root $relative_path_to_package) $specific_version) say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path" @@ -288,10 +288,14 @@ get_azure_channel_from_channel() { echo "dev" return 0 ;; - preview|beta) + beta) echo "beta" return 0 ;; + preview) + echo "preview" + return 0 + ;; production) say_err "Production channel does not exist yet" return 1 @@ -343,7 +347,7 @@ construct_download_link() { local azure_feed=$1 local azure_channel=$2 local normalized_architecture=$3 - local specific_version=$4 + local specific_version=${4//[$'\t\r\n']} local osname=$(get_current_os_name) @@ -528,7 +532,7 @@ local_version_file_relative_path="/.version" bin_folder_relative_path="" temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX" -channel="preview" +channel="beta" version="Latest" install_dir="" architecture=""