.NET Core 2+ Naming and Versioning

New file name structure for the runtime and the CLI
per: https://github.com/dotnet/designs/issues/2

The renaming of assets, therefore the dotnet installation scripts must change to accommodate.

Trivial:
"Write-Host" should be "Write-Output"
This commit is contained in:
John Beisner 2017-05-26 15:46:56 -07:00
parent 88a8826925
commit b48b7d2ea0
11 changed files with 165 additions and 117 deletions

View file

@ -398,9 +398,9 @@ construct_download_link() {
local download_link=null
if [ "$shared_runtime" = true ]; then
download_link="$azure_feed/Runtime/$specific_version/dotnet-$osname-$normalized_architecture.$specific_version.tar.gz"
download_link="$azure_feed/Runtime/$specific_version/dotnet-$specific_version-$osname-$normalized_architecture.tar.gz"
else
download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$osname-$normalized_architecture.$specific_version.tar.gz"
download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$specific_version-$osname-$normalized_architecture.tar.gz"
fi
echo "$download_link"
@ -424,11 +424,20 @@ construct_alt_download_link() {
distro_specific_osname=$(get_distro_specific_os_name) || return 1
local alt_download_link=null
if [ "$shared_runtime" = true ]; then
alt_download_link="$azure_feed/Runtime/$specific_version/dotnet-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz"
if [ "$(uname)" = "Linux" ]; then
if [ "$shared_runtime" = true ]; then
alt_download_link="$azure_feed/Runtime/$specific_version/dotnet-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz"
else
alt_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz"
fi
else
alt_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz"
if [ "$shared_runtime" = true ]; then
alt_download_link="$azure_feed/Runtime/$specific_version/dotnet-$osname-$normalized_architecture.$specific_version.tar.gz"
else
alt_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$osname-$normalized_architecture.$specific_version.tar.gz"
fi
fi
echo "$alt_download_link"
return 0
@ -615,10 +624,8 @@ calculate_vars() {
download_link=$(construct_download_link $azure_feed $channel $normalized_architecture $specific_version)
say_verbose "download_link=$download_link"
if [ "$(uname)" = "Linux" ]; then
alt_download_link=$(construct_alt_download_link $azure_feed $channel $normalized_architecture $specific_version)
say_verbose "alt_download_link=$alt_download_link"
fi
alt_download_link=$(construct_alt_download_link $azure_feed $channel $normalized_architecture $specific_version)
say_verbose "alt_download_link=$alt_download_link"
install_root=$(resolve_installation_path $install_dir)
say_verbose "install_root=$install_root"
@ -640,8 +647,8 @@ install_dotnet() {
say "Downloading link: $download_link"
download "$download_link" $zip_path || download_failed=true
# if the download fails, download the alt_download_link [Linux only]
if [ "$(uname)" = "Linux" ] && [ "$download_failed" = true ]; then
# if the download fails, download the alt_download_link
if [ "$download_failed" = true ]; then
say "Cannot download: $download_link"
zip_path=$(mktemp $temporary_file_template)
say_verbose "Alternate zip path: $zip_path"
@ -768,9 +775,7 @@ check_min_reqs
calculate_vars
if [ "$dry_run" = true ]; then
say "Payload URL: $download_link"
if [ "$(uname)" = "Linux" ]; then
say "Alternate payload URL: $alt_download_link"
fi
say "Alternate payload URL: $alt_download_link"
say "Repeatable invocation: ./$(basename $0) --version $specific_version --channel $channel --install-dir $install_dir"
exit 0
fi