Commit be5f1965 authored by Nick Craver's avatar Nick Craver

.Net Core 1.0 RTM update

parent 7043052b
......@@ -55,7 +55,7 @@
"define": [ "ASYNC", "COREFX" ]
},
"dependencies": {
"Microsoft.CSharp": "4.0.1-rc2-24027"
"Microsoft.CSharp": "4.0.1"
}
}
}
......
......@@ -55,7 +55,7 @@
"define": [ "ASYNC", "COREFX" ]
},
"dependencies": {
"Microsoft.CSharp": "4.0.1-rc2-24027"
"Microsoft.CSharp": "4.0.1"
}
}
}
......
......@@ -45,7 +45,7 @@
"define": [ "ASYNC", "COREFX" ]
},
"dependencies": {
"Microsoft.CSharp": "4.0.1-rc2-24027"
"Microsoft.CSharp": "4.0.1"
}
}
}
......
......@@ -64,14 +64,24 @@
"define": [ "ASYNC", "COREFX" ]
},
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-24027",
"System.Data.SqlClient": "4.1.0-rc2-24027",
"System.Dynamic.Runtime": "4.0.11-rc2-24027",
"System.Reflection.Emit": "4.0.1-rc2-24027",
"System.Reflection.Emit.Lightweight": "4.0.1-rc2-24027",
"System.Xml.XmlDocument": "4.0.1-rc2-24027",
"System.Collections.NonGeneric": "4.0.1-rc2-24027",
"System.Reflection.TypeExtensions": "4.1.0-rc2-24027"
"System.Collections": "4.0.11",
"System.Collections.Concurrent": "4.0.12",
"System.Collections.NonGeneric": "4.0.1",
"System.Data.SqlClient": "4.1.0",
"System.Dynamic.Runtime": "4.0.11",
"System.Linq": "4.1.0",
"System.Reflection": "4.1.0",
"System.Reflection.Emit": "4.0.1",
"System.Reflection.Emit.Lightweight": "4.0.1",
"System.Reflection.Extensions": "4.0.1",
"System.Reflection.TypeExtensions": "4.1.0",
"System.Runtime": "4.1.0",
"System.Runtime.Extensions": "4.1.0",
"System.Runtime.InteropServices": "4.1.0",
"System.Text.RegularExpressions": "4.1.0",
"System.Threading": "4.0.11",
"System.Xml.XDocument": "4.0.11",
"System.Xml.XmlDocument": "4.0.1"
}
}
}
......
......@@ -24,7 +24,9 @@
},
"Dapper.SqlBuilder": {
"target": "project"
}
},
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029"
},
"buildOptions": {
"warningsAsErrors": true,
......@@ -95,18 +97,15 @@
// }
//},
"netcoreapp1.0": {
"imports": [ "dnxcore50", "portable-net45+win8" ],
"buildOptions": {
"define": [ "COREFX", "ASYNC", "XUNIT2" ]
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-3002702",
"version": "1.0.0",
"type": "platform"
},
"Microsoft.Data.Sqlite": "1.0.0-rc2-final",
"xunit": "2.1.0",
"dotnet-test-xunit": "1.0.0-rc3-*"
"Microsoft.Data.Sqlite": "1.0.0"
}
}
}
......
......@@ -21,7 +21,9 @@
},
"Dapper.Contrib": {
"target": "project"
}
},
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029"
},
"buildOptions": {
"warningsAsErrors": true,
......@@ -126,18 +128,15 @@
// }
//},
"netcoreapp1.0": {
"imports": [ "dnxcore50", "portable-net45+win8" ],
"buildOptions": {
"define": [ "ASYNC", "COREFX", "XUNIT2", "SQLITE" ]
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-3002702",
"version": "1.0.0",
"type": "platform"
},
"Microsoft.Data.Sqlite": "1.0.0-rc2-final",
"xunit": "2.1.0",
"dotnet-test-xunit": "1.0.0-rc3-*"
"Microsoft.Data.Sqlite": "1.0.0"
}
}
}
......
......@@ -55,14 +55,24 @@
"define": [ "ASYNC", "COREFX" ]
},
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-24027",
"System.Data.SqlClient": "4.1.0-rc2-24027",
"System.Dynamic.Runtime": "4.0.11-rc2-24027",
"System.Reflection.Emit": "4.0.1-rc2-24027",
"System.Reflection.Emit.Lightweight": "4.0.1-rc2-24027",
"System.Xml.XmlDocument": "4.0.1-rc2-24027",
"System.Collections.NonGeneric": "4.0.1-rc2-24027",
"System.Reflection.TypeExtensions": "4.1.0-rc2-24027"
"System.Collections": "4.0.11",
"System.Collections.Concurrent": "4.0.12",
"System.Collections.NonGeneric": "4.0.1",
"System.Data.SqlClient": "4.1.0",
"System.Dynamic.Runtime": "4.0.11",
"System.Linq": "4.1.0",
"System.Reflection": "4.1.0",
"System.Reflection.Emit": "4.0.1",
"System.Reflection.Emit.Lightweight": "4.0.1",
"System.Reflection.Extensions": "4.0.1",
"System.Reflection.TypeExtensions": "4.1.0",
"System.Runtime": "4.1.0",
"System.Runtime.Extensions": "4.1.0",
"System.Runtime.InteropServices": "4.1.0",
"System.Text.RegularExpressions": "4.1.0",
"System.Threading": "4.0.11",
"System.Xml.XDocument": "4.0.11",
"System.Xml.XmlDocument": "4.0.1"
}
}
}
......
{
"sdk": {
"version": "1.0.0-preview1-002702"
"version": "1.0.0-preview2-003121"
},
"projects": [
"Dapper",
......
......@@ -23,12 +23,15 @@
- lkg - last known good version on specific channel
Note: LKG work is in progress. Once the work is finished, this will become new default
.PARAMETER InstallDir
Default: %LocalAppData%\Microsoft\.dotnet
Default: %LocalAppData%\Microsoft\dotnet
Path to where to install dotnet. Note that binaries will be placed directly in a given directory.
.PARAMETER Architecture
Default: <auto> - this value represents currently running OS architecture
Architecture of dotnet binaries to be installed.
Possible values are: <auto>, x64 and x86
.PARAMETER SharedRuntime
Default: false
Installs just the shared runtime bits, not the entire SDK
.PARAMETER DebugSymbols
If set the installer will include symbols in the installation.
.PARAMETER DryRun
......@@ -47,10 +50,11 @@
#>
[cmdletbinding()]
param(
[string]$Channel="preview",
[string]$Channel="rel-1.0.0",
[string]$Version="Latest",
[string]$InstallDir="<auto>",
[string]$Architecture="<auto>",
[switch]$SharedRuntime,
[switch]$DebugSymbols, # TODO: Switch does not work yet. Symbols zip is not being uploaded yet.
[switch]$DryRun,
[switch]$NoPath,
......@@ -68,11 +72,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) {
......@@ -114,9 +118,22 @@ function Get-Version-Info-From-Version-Text([string]$VersionText) {
function Get-Latest-Version-Info([string]$AzureFeed, [string]$AzureChannel, [string]$CLIArchitecture) {
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/Sdk/$AzureChannel/latest.version"
}
$Response = Invoke-WebRequest -UseBasicParsing $VersionFileUrl
$VersionText = [Text.Encoding]::UTF8.GetString($Response.Content)
switch ($Response.Headers.'Content-Type'){
{ ($_ -eq "application/octet-stream") } { $VersionText = [Text.Encoding]::UTF8.GetString($Response.Content) }
{ ($_ -eq "text/plain") } { $VersionText = $Response.Content }
default { throw "``$Response.Headers.'Content-Type'`` is an unknown .version file content type." }
}
$VersionInfo = Get-Version-Info-From-Version-Text $VersionText
......@@ -130,9 +147,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 "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 { return $_ }
}
}
......@@ -153,13 +169,16 @@ function Get-Download-Links([string]$AzureFeed, [string]$AzureChannel, [string]$
Say-Invocation $MyInvocation
$ret = @()
$files = @("dotnet-dev")
foreach ($file in $files) {
$PayloadURL = "$AzureFeed/$AzureChannel/Binaries/$SpecificVersion/$file-win-$CLIArchitecture.$SpecificVersion.zip"
Say-Verbose "Constructed payload URL: $PayloadURL"
$ret += $PayloadURL
if ($SharedRuntime) {
$PayloadURL = "$AzureFeed/$AzureChannel/Binaries/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip"
}
else {
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-dev-win-$CLIArchitecture.$SpecificVersion.zip"
}
Say-Verbose "Constructed payload URL: $PayloadURL"
$ret += $PayloadURL
return $ret
}
......@@ -169,7 +188,7 @@ function Get-User-Share-Path() {
$InstallRoot = $env:DOTNET_INSTALL_DIR
if (!$InstallRoot) {
$InstallRoot = "$env:LocalAppData\Microsoft\.dotnet"
$InstallRoot = "$env:LocalAppData\Microsoft\dotnet"
}
return $InstallRoot
}
......@@ -300,7 +319,7 @@ if ($DryRun) {
Say "- $DownloadLink"
}
Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir"
return
exit 0
}
$InstallRoot = Resolve-Installation-Path $InstallDir
......@@ -310,7 +329,7 @@ $IsSdkInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -Relativ
Say-Verbose ".NET SDK installed? $IsSdkInstalled"
if ($IsSdkInstalled) {
Say ".NET SDK version $SpecificVersion is already installed."
return
exit 0
}
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
......@@ -329,10 +348,11 @@ foreach ($DownloadLink in $DownloadLinks) {
$BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath)
if (-Not $NoPath) {
Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process."
$env:path += ";$BinPath"
$env:path = "$BinPath;" + $env:path
}
else {
Say "Binaries of dotnet can be found in $BinPath"
}
Say "Installation finished"
\ No newline at end of file
Say "Installation finished"
exit 0
\ No newline at end of file
......@@ -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() {
......@@ -66,6 +66,11 @@ get_current_os_name() {
else
# Detect Distro
if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then
echo "ubuntu.16.04"
return 0
fi
echo "ubuntu"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
......@@ -77,6 +82,16 @@ get_current_os_name() {
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
echo "debian"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then
if [ "$(cat /etc/*-release | grep -cim1 23)" -eq 1 ]; then
echo "fedora.23"
return 0
fi
elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then
echo "opensuse.13.2"
return 0
fi
fi
fi
......@@ -121,7 +136,6 @@ check_pre_reqs() {
[ -z "$($LDCONFIG_COMMAND -p | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && failing=true
[ -z "$($LDCONFIG_COMMAND -p | grep libcurl)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && failing=true
[ -z "$($LDCONFIG_COMMAND -p | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && failing=true
[ -z "$($LDCONFIG_COMMAND -p | grep gettext)" ] && say_err "Unable to locate gettext. Install gettext to continue" && failing=true
fi
if [ "$failing" = true ]; then
......@@ -245,7 +259,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"
......@@ -270,7 +284,12 @@ get_latest_version_info() {
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/Sdk/$azure_channel/latest.version"
fi
say_verbose "get_latest_version_info: latest url: $version_file_url"
download $version_file_url
......@@ -288,17 +307,13 @@ get_azure_channel_from_channel() {
echo "dev"
return 0
;;
preview|beta)
echo "beta"
return 0
;;
production)
say_err "Production channel does not exist yet"
return 1
esac
say_err "``$1`` is an invalid channel name. Use one of the following: ``future``, ``preview``, ``production``"
return 1
echo $channel
return 0
}
# args:
......@@ -343,11 +358,17 @@ 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)
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/Sdk/$specific_version/dotnet-dev-$osname-$normalized_architecture.$specific_version.tar.gz"
fi
echo "$download_link"
return 0
}
......@@ -358,7 +379,7 @@ get_user_share_path() {
if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then
echo $DOTNET_INSTALL_DIR
else
echo "/usr/local/share/dotnet"
echo "$HOME/.dotnet"
fi
return 0
}
......@@ -528,7 +549,7 @@ local_version_file_relative_path="/.version"
bin_folder_relative_path=""
temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX"
channel="preview"
channel="rel-1.0.0"
version="Latest"
install_dir="<auto>"
architecture="<auto>"
......@@ -537,6 +558,7 @@ dry_run=false
no_path=false
azure_feed="https://dotnetcli.blob.core.windows.net/dotnet"
verbose=false
shared_runtime=false
while [ $# -ne 0 ]
do
......@@ -558,6 +580,9 @@ do
shift
architecture="$1"
;;
--shared-runtime|-[Ss]hared[Rr]untime)
shared_runtime=true
;;
--debug-symbols|-[Dd]ebug[Ss]ymbols)
debug_symbols=true
;;
......@@ -591,6 +616,8 @@ do
echo " -InstallDir"
echo " --architecture <ARCHITECTURE> Architecture of .NET Tools. Currently only x64 is supported."
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 " --dry-run,-DryRun Do not perform installation. Display download link."
echo " --no-path, -NoPath Do not set PATH for the current process."
......@@ -619,7 +646,7 @@ calculate_vars
if [ "$dry_run" = true ]; then
say "Payload URL: $download_link"
say "Repeatable invocation: ./$(basename $0) --version $specific_version --channel $channel --install-dir $install_dir"
return 0
exit 0
fi
check_pre_reqs
......@@ -628,9 +655,9 @@ install_dotnet
bin_path=$(get_absolute_path $(combine_paths $install_root $bin_folder_relative_path))
if [ "$no_path" = false ]; then
say "Adding to current process PATH: ``$bin_path``. Note: This change will be visible only when sourcing script."
export PATH=$PATH:$bin_path
export PATH=$bin_path:$PATH
else
say "Binaries of dotnet can be found in $bin_path"
fi
say "Installation finished successfuly."
\ No newline at end of file
say "Installation finished successfully."
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment