Update the install scripts to use the preview channel.

Also the default now is the beta channel which has the latest 'preview1'
builds.
This commit is contained in:
Sridhar Periyasamy 2016-05-10 15:35:10 -07:00
parent aa94c51271
commit 2d435ac880
4 changed files with 23 additions and 13 deletions

View file

@ -47,7 +47,7 @@
#> #>
[cmdletbinding()] [cmdletbinding()]
param( param(
[string]$Channel="preview", [string]$Channel="beta",
[string]$Version="Latest", [string]$Version="Latest",
[string]$InstallDir="<auto>", [string]$InstallDir="<auto>",
[string]$Architecture="<auto>", [string]$Architecture="<auto>",
@ -130,7 +130,8 @@ function Get-Azure-Channel-From-Channel([string]$Channel) {
# For compatibility with build scripts accept also directly Azure channels names # For compatibility with build scripts accept also directly Azure channels names
switch ($Channel.ToLower()) { switch ($Channel.ToLower()) {
{ ($_ -eq "future") -or ($_ -eq "dev") } { return "dev" } { ($_ -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" } { $_ -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``" } default { throw "``$Channel`` is an invalid channel name. Use one of the following: ``future``, ``preview``, ``production``" }
} }

View file

@ -288,10 +288,14 @@ get_azure_channel_from_channel() {
echo "dev" echo "dev"
return 0 return 0
;; ;;
preview|beta) beta)
echo "beta" echo "beta"
return 0 return 0
;; ;;
preview)
echo "preview"
return 0
;;
production) production)
say_err "Production channel does not exist yet" say_err "Production channel does not exist yet"
return 1 return 1
@ -528,7 +532,7 @@ local_version_file_relative_path="/.version"
bin_folder_relative_path="" bin_folder_relative_path=""
temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX" temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX"
channel="preview" channel="beta"
version="Latest" version="Latest"
install_dir="<auto>" install_dir="<auto>"
architecture="<auto>" architecture="<auto>"

View file

@ -47,7 +47,7 @@
#> #>
[cmdletbinding()] [cmdletbinding()]
param( param(
[string]$Channel="preview", [string]$Channel="beta",
[string]$Version="Latest", [string]$Version="Latest",
[string]$InstallDir="<auto>", [string]$InstallDir="<auto>",
[string]$Architecture="<auto>", [string]$Architecture="<auto>",
@ -68,11 +68,11 @@ $VersionRegEx="/\d+\.\d+[^/]+/"
$OverrideNonVersionedFiles=$true $OverrideNonVersionedFiles=$true
function Say($str) { function Say($str) {
Write-Host "dotnet_install: $str" Write-Host "dotnet-install: $str"
} }
function Say-Verbose($str) { function Say-Verbose($str) {
Write-Verbose "dotnet_install: $str" Write-Verbose "dotnet-install: $str"
} }
function Say-Invocation($Invocation) { 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 # For compatibility with build scripts accept also directly Azure channels names
switch ($Channel.ToLower()) { switch ($Channel.ToLower()) {
{ ($_ -eq "future") -or ($_ -eq "dev") } { return "dev" } { ($_ -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" } { $_ -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``" } default { throw "``$Channel`` is an invalid channel name. Use one of the following: ``future``, ``preview``, ``production``" }
} }

View file

@ -47,7 +47,7 @@ say_err() {
say() { say() {
# using stream 3 (defined in the beginning) to not interfere with stdout of functions # using stream 3 (defined in the beginning) to not interfere with stdout of functions
# which may be used as return value # 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() { say_verbose() {
@ -245,7 +245,7 @@ is_dotnet_package_installed() {
local install_root=$1 local install_root=$1
local relative_path_to_package=$2 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) 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" say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path"
@ -288,10 +288,14 @@ get_azure_channel_from_channel() {
echo "dev" echo "dev"
return 0 return 0
;; ;;
preview|beta) beta)
echo "beta" echo "beta"
return 0 return 0
;; ;;
preview)
echo "preview"
return 0
;;
production) production)
say_err "Production channel does not exist yet" say_err "Production channel does not exist yet"
return 1 return 1
@ -343,7 +347,7 @@ construct_download_link() {
local azure_feed=$1 local azure_feed=$1
local azure_channel=$2 local azure_channel=$2
local normalized_architecture=$3 local normalized_architecture=$3
local specific_version=$4 local specific_version=${4//[$'\t\r\n']}
local osname=$(get_current_os_name) local osname=$(get_current_os_name)
@ -528,7 +532,7 @@ local_version_file_relative_path="/.version"
bin_folder_relative_path="" bin_folder_relative_path=""
temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX" temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX"
channel="preview" channel="beta"
version="Latest" version="Latest"
install_dir="<auto>" install_dir="<auto>"
architecture="<auto>" architecture="<auto>"