bootstrap using nuget instead of dnx
This commit is contained in:
parent
90fad34d5a
commit
066bebcc6c
72 changed files with 459 additions and 544 deletions
|
@ -1,36 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
. $PSScriptRoot\..\common\_common.ps1
|
||||
|
||||
$DnxPackage = "dnx-coreclr-win-x64.1.0.0-rc1-update1.nupkg"
|
||||
$DnxVersion = "1.0.0-rc1-16231"
|
||||
|
||||
$doInstall = $true
|
||||
|
||||
# check if the required dnx version is already downloaded
|
||||
if ((Test-Path "$DnxRoot\dnx.exe")) {
|
||||
$dnxOut = & "$DnxRoot\dnx.exe" --version
|
||||
|
||||
if ($dnxOut -Match $DnxVersion) {
|
||||
Write-Host "Dnx version - $DnxVersion already downloaded."
|
||||
|
||||
$doInstall = $false
|
||||
}
|
||||
}
|
||||
|
||||
if ($doInstall)
|
||||
{
|
||||
# Download dnx to copy to stage2
|
||||
Remove-Item -Recurse -Force -ErrorAction Ignore $DnxDir
|
||||
mkdir -Force "$DnxDir" | Out-Null
|
||||
|
||||
Write-Host "Downloading Dnx version - $DnxVersion."
|
||||
$DnxUrl="https://api.nuget.org/packages/$DnxPackage"
|
||||
Invoke-WebRequest -UseBasicParsing "$DnxUrl" -OutFile "$DnxDir\dnx.zip"
|
||||
|
||||
Add-Type -Assembly System.IO.Compression.FileSystem | Out-Null
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory("$DnxDir\dnx.zip", "$DnxDir")
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
source "$DIR/../common/_common.sh"
|
||||
|
||||
say() {
|
||||
printf "%b\n" "dotnet_install_dnx: $1"
|
||||
}
|
||||
|
||||
doInstall=true
|
||||
|
||||
DNX_FEED="https://api.nuget.org/packages"
|
||||
DNX_PACKAGE_VERSION="1.0.0-rc1-update1"
|
||||
DNX_VERSION="1.0.0-rc1-16231"
|
||||
|
||||
if [ "$OSNAME" == "osx" ]; then
|
||||
DNX_FLAVOR="dnx-coreclr-darwin-x64"
|
||||
elif [ "$OSNAME" == "ubuntu" ]; then
|
||||
DNX_FLAVOR="dnx-coreclr-linux-x64"
|
||||
elif [ "$OSNAME" == "centos" ]; then
|
||||
# No support dnx on redhat yet.
|
||||
# using patched dnx
|
||||
DNX_FEED="https://dotnetcli.blob.core.windows.net/dotnet/redhat_dnx"
|
||||
DNX_PACKAGE_VERSION="1.0.0-rc2-15000"
|
||||
DNX_VERSION="1.0.0-rc2-15000"
|
||||
DNX_FLAVOR="dnx-coreclr-redhat-x64"
|
||||
else
|
||||
error "unknown OS: $OSNAME" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DNX_URL="$DNX_FEED/$DNX_FLAVOR.$DNX_PACKAGE_VERSION.nupkg"
|
||||
|
||||
say "Preparing to install DNX to $DNX_DIR"
|
||||
say "Requested Version: $DNX_VERSION"
|
||||
|
||||
if [ -e "$DNX_ROOT/dnx" ] ; then
|
||||
dnxOut=`$DNX_ROOT/dnx --version | grep '^ Version: ' | awk '{ print $2; }'`
|
||||
|
||||
say "Local Version: $dnxOut"
|
||||
|
||||
if [ $dnxOut = $DNX_VERSION ] ; then
|
||||
say "You already have the requested version."
|
||||
|
||||
doInstall=false
|
||||
fi
|
||||
else
|
||||
say "Local Version: Not Installed"
|
||||
fi
|
||||
|
||||
if [ $doInstall = true ] ; then
|
||||
rm -rf $DNX_DIR
|
||||
|
||||
mkdir -p $DNX_DIR
|
||||
curl -o $DNX_DIR/dnx.zip $DNX_URL --silent
|
||||
unzip -qq $DNX_DIR/dnx.zip -d $DNX_DIR
|
||||
chmod a+x $DNX_ROOT/dnu $DNX_ROOT/dnx
|
||||
fi
|
|
@ -14,10 +14,3 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR))
|
|||
# Install a stage 0
|
||||
header "Installing dotnet stage 0"
|
||||
_ "$RepoRoot\scripts\obtain\install.ps1" @("$env:Channel")
|
||||
|
||||
# Put stage0 on the PATH
|
||||
$env:PATH = "$env:DOTNET_INSTALL_DIR\cli\bin;$env:PATH"
|
||||
|
||||
# Download dnx to copy to stage2
|
||||
header "Downloading DNX $DnxVersion"
|
||||
_ "$RepoRoot\scripts\obtain\install-dnx.ps1"
|
||||
|
|
|
@ -22,10 +22,3 @@ source "$DIR/../common/_common.sh"
|
|||
# Ensure the latest stage0 is installed
|
||||
header "Installing dotnet stage 0"
|
||||
$REPOROOT/scripts/obtain/install.sh
|
||||
|
||||
# Put the stage0 on the PATH
|
||||
export PATH=$REPOROOT/artifacts/$RID/stage0/bin:$PATH
|
||||
|
||||
# Download DNX to copy into stage2
|
||||
header "Downloading DNX $DNX_VERSION"
|
||||
$REPOROOT/scripts/obtain/install-dnx.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue