Merge branch 'rel/1.0.0' of https://github.com/dotnet/cli into test-fx
This commit is contained in:
commit
f86952cf1d
72 changed files with 569 additions and 270 deletions
|
@ -1,4 +1,6 @@
|
|||
@echo off
|
||||
REM Turn echo off off so we can echo with echo and the echoing
|
||||
REM (But seriously, this script has weird hangs and crashes sometimes so we want to know exactly which commands are failing)
|
||||
REM @echo off
|
||||
|
||||
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
@ -13,7 +15,7 @@ set BIN_DIR=%CD%\bin
|
|||
popd
|
||||
|
||||
REM Replace with a robust method for finding the right crossgen.exe
|
||||
set CROSSGEN_UTIL=%NUGET_PACKAGES%\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-rc2-23808\tools\crossgen.exe
|
||||
set CROSSGEN_UTIL=%NUGET_PACKAGES%\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-rc2-23811\tools\crossgen.exe
|
||||
|
||||
REM Crossgen currently requires itself to be next to mscorlib
|
||||
copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul
|
||||
|
|
|
@ -44,7 +44,7 @@ fi
|
|||
READYTORUN=""
|
||||
|
||||
# Replace with a robust method for finding the right crossgen.exe
|
||||
CROSSGEN_UTIL=$NUGET_PACKAGES/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23808/tools/crossgen
|
||||
CROSSGEN_UTIL=$NUGET_PACKAGES/runtime.$RID.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23811/tools/crossgen
|
||||
|
||||
cd $BIN_DIR
|
||||
|
||||
|
@ -70,4 +70,4 @@ chmod +x crossgen
|
|||
./crossgen -nologo $READYTORUN -platform_assemblies_paths $BIN_DIR vbc.dll
|
||||
[ -e vbc.ni.exe ] && [ ! -e vbc.ni.dll ] && mv vbc.ni.exe vbc.ni.dll
|
||||
|
||||
info "CrossGen Roslyn Finished"
|
||||
info "CrossGen Roslyn Finished"
|
||||
|
|
|
@ -22,3 +22,13 @@ source "$DIR/../common/_common.sh"
|
|||
# Ensure the latest stage0 is installed
|
||||
header "Installing dotnet stage 0"
|
||||
$REPOROOT/scripts/obtain/install.sh
|
||||
|
||||
# Now patch the runtime in stage 0
|
||||
# HACK(anurse): BIG HACK. This is just to dodge the current broken Linux stage0. We'll remove it as soon as we've got a new stage 0
|
||||
(
|
||||
export PATH="$DOTNET_INSTALL_DIR/bin:$PATH"
|
||||
cd $REPOROOT/src/Microsoft.DotNet.Runtime
|
||||
dotnet restore
|
||||
dotnet publish -o "$DOTNET_INSTALL_DIR/share/dotnet/cli/runtime/coreclr"
|
||||
cp $DOTNET_INSTALL_DIR/share/dotnet/cli/runtime/coreclr/* $DOTNET_INSTALL_DIR/share/dotnet/cli/bin
|
||||
)
|
||||
|
|
|
@ -3,15 +3,21 @@
|
|||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
param([string]$Channel="dev")
|
||||
|
||||
param(
|
||||
[string]$Channel="dev",
|
||||
[string]$version="Latest"
|
||||
)
|
||||
|
||||
$ErrorActionPreference="Stop"
|
||||
$ProgressPreference="SilentlyContinue"
|
||||
|
||||
$fileVersion = $Version
|
||||
if ($fileVersion -eq "Latest") {
|
||||
$fileVersion = "latest"
|
||||
}
|
||||
$Feed="https://dotnetcli.blob.core.windows.net/dotnet"
|
||||
$DotNetFileName="dotnet-win-x64.latest.zip"
|
||||
$DotNetUrl="$Feed/$Channel/Binaries/Latest"
|
||||
$DotNetFileName="dotnet-win-x64.$fileVersion.zip"
|
||||
$DotNetUrl="$Feed/$Channel/Binaries/$Version"
|
||||
|
||||
function say($str)
|
||||
{
|
||||
|
@ -34,21 +40,29 @@ if (Test-Path $LocalFile)
|
|||
$LocalVersion = $LocalData[1].Trim()
|
||||
if ($LocalVersion -and $LocalHash)
|
||||
{
|
||||
$RemoteResponse = Invoke-WebRequest -UseBasicParsing "$Feed/$Channel/dnvm/latest.win.version"
|
||||
$RemoteData = @([Text.Encoding]::UTF8.GetString($RemoteResponse.Content).Split([char[]]@(), [StringSplitOptions]::RemoveEmptyEntries));
|
||||
$RemoteHash = $RemoteData[0].Trim()
|
||||
$RemoteVersion = $RemoteData[1].Trim()
|
||||
|
||||
if (!$RemoteVersion -or !$RemoteHash) {
|
||||
throw "Invalid response from feed"
|
||||
}
|
||||
|
||||
say "Latest version: $RemoteVersion"
|
||||
say "Local Version: $LocalVersion"
|
||||
|
||||
if($LocalHash -eq $RemoteHash)
|
||||
if ($Version -eq "Latest")
|
||||
{
|
||||
say "You already have the latest version"
|
||||
$RemoteResponse = Invoke-WebRequest -UseBasicParsing "$Feed/$Channel/dnvm/latest.win.version"
|
||||
$RemoteData = @([Text.Encoding]::UTF8.GetString($RemoteResponse.Content).Split([char[]]@(), [StringSplitOptions]::RemoveEmptyEntries));
|
||||
$RemoteHash = $RemoteData[0].Trim()
|
||||
$RemoteVersion = $RemoteData[1].Trim()
|
||||
|
||||
if (!$RemoteVersion -or !$RemoteHash) {
|
||||
throw "Invalid response from feed"
|
||||
}
|
||||
|
||||
say "Latest version: $RemoteVersion"
|
||||
say "Local Version: $LocalVersion"
|
||||
|
||||
if($LocalHash -eq $RemoteHash)
|
||||
{
|
||||
say "You already have the latest version"
|
||||
exit 0
|
||||
}
|
||||
}
|
||||
elseif ($LocalVersion -eq $Version)
|
||||
{
|
||||
say "$Version is already installed."
|
||||
exit 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/env sh
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
@ -162,10 +160,17 @@ install_dotnet()
|
|||
say_err "Ending install due to missing pre-reqs"
|
||||
return 1;
|
||||
fi
|
||||
|
||||
if [ "$VERSION" == "Latest" ]; then
|
||||
local fileVersion=latest
|
||||
else
|
||||
local fileVersion=$VERSION
|
||||
fi
|
||||
|
||||
local os=$(current_os)
|
||||
local installLocation="$PREFIX/share/dotnet"
|
||||
local dotnet_url="https://dotnetcli.blob.core.windows.net/dotnet/$CHANNEL/Binaries/Latest"
|
||||
local dotnet_filename="dotnet-$os-x64.latest.tar.gz"
|
||||
local dotnet_url="https://dotnetcli.blob.core.windows.net/dotnet/$CHANNEL/Binaries/$VERSION"
|
||||
local dotnet_filename="dotnet-$os-x64.$fileVersion.tar.gz"
|
||||
|
||||
if [ "$RELINK" = "0" ]; then
|
||||
if [ "$FORCE" = "0" ]; then
|
||||
|
@ -246,6 +251,10 @@ do
|
|||
shift
|
||||
CHANNEL=$1
|
||||
;;
|
||||
-v|--version)
|
||||
shift
|
||||
VERSION=$1
|
||||
;;
|
||||
-d|--destination)
|
||||
shift
|
||||
DOTNET_INSTALL_DIR=$1
|
||||
|
@ -288,5 +297,6 @@ elif [ -z "$PREFIX" ]; then
|
|||
fi
|
||||
|
||||
[ -z "$CHANNEL" ] && CHANNEL="dev"
|
||||
[ -z "$VERSION" ] && VERSION="Latest"
|
||||
|
||||
install_dotnet
|
||||
|
|
|
@ -114,20 +114,20 @@ function UploadBinaries($zipFile)
|
|||
return 0
|
||||
}
|
||||
|
||||
function UploadInstallers($msiFile)
|
||||
function UploadInstallers($installerFile)
|
||||
{
|
||||
$fileName = [System.IO.Path]::GetFileName($msiFile)
|
||||
$msiBlob = "$env:CHANNEL/Installers/$env:DOTNET_CLI_VERSION/$fileName"
|
||||
$fileName = [System.IO.Path]::GetFileName($installerFile)
|
||||
$installerBlob = "$env:CHANNEL/Installers/$env:DOTNET_CLI_VERSION/$fileName"
|
||||
|
||||
if(-Not (UploadFile $msiBlob $msiFile))
|
||||
if(-Not (UploadFile $installerBlob $installerFile))
|
||||
{
|
||||
return -1
|
||||
}
|
||||
|
||||
Write-Host "Updating the latest dotnet installer for windows.."
|
||||
$msiBlobLatest = "$env:CHANNEL/Installers/Latest/dotnet-win-x64.latest.msi"
|
||||
$installerBlobLatest = "$env:CHANNEL/Installers/Latest/dotnet-win-x64.latest.exe"
|
||||
|
||||
if(-Not (UploadFile $msiBlobLatest $msiFile))
|
||||
if(-Not (UploadFile $installerBlobLatest $installerFile))
|
||||
{
|
||||
return -1
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ if([System.IO.Path]::GetExtension($file).ToLower() -eq ".zip")
|
|||
{
|
||||
$result = UploadBinaries $file
|
||||
}
|
||||
elseif([System.IO.Path]::GetExtension($file).ToLower() -eq ".msi")
|
||||
elseif([System.IO.Path]::GetExtension($file).ToLower() -eq ".exe")
|
||||
{
|
||||
$result = UploadInstallers $file
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue