Added dnvm2 to bootstrap dotnet sdk
This commit is contained in:
parent
dade339a33
commit
2fa96c3f94
3 changed files with 1821 additions and 6 deletions
|
@ -10,15 +10,15 @@ pushd %~dp0..
|
||||||
set REPOROOT=%CD%
|
set REPOROOT=%CD%
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
set STAGE0_DIR=%REPOROOT%\artifacts\stage0
|
||||||
set STAGE1_DIR=%REPOROOT%\artifacts\stage1
|
set STAGE1_DIR=%REPOROOT%\artifacts\stage1
|
||||||
set STAGE2_DIR=%REPOROOT%\artifacts\stage2
|
set STAGE2_DIR=%REPOROOT%\artifacts\stage2
|
||||||
set DOTNET_PUBLISH=%REPOROOT%\scripts\dnxhost\dotnet-publish.cmd
|
|
||||||
|
|
||||||
where dnvm >nul 2>nul
|
where dnvm >nul 2>nul
|
||||||
if %errorlevel% == 0 goto have_dnvm
|
if %errorlevel% == 0 goto have_dnvm
|
||||||
|
|
||||||
REM download dnvm
|
REM download dnvm
|
||||||
echo Installing dnvm (DNX is needed to bootstrap currently) ...
|
echo Installing dnvm (DNU is needed to bootstrap currently for package restore) ...
|
||||||
powershell -NoProfile -ExecutionPolicy Unrestricted -Command "&{$Branch='dev';$wc=New-Object System.Net.WebClient;$wc.Proxy=[System.Net.WebRequest]::DefaultWebProxy;$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;Invoke-Expression ($wc.DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
|
powershell -NoProfile -ExecutionPolicy Unrestricted -Command "&{$Branch='dev';$wc=New-Object System.Net.WebClient;$wc.Proxy=[System.Net.WebRequest]::DefaultWebProxy;$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;Invoke-Expression ($wc.DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
|
||||||
|
|
||||||
:have_dnvm
|
:have_dnvm
|
||||||
|
@ -41,18 +41,23 @@ if errorlevel 1 goto fail
|
||||||
call dnu restore "%REPOROOT%\src\Microsoft.DotNet.Tools.Publish"
|
call dnu restore "%REPOROOT%\src\Microsoft.DotNet.Tools.Publish"
|
||||||
if errorlevel 1 goto fail
|
if errorlevel 1 goto fail
|
||||||
|
|
||||||
echo Building basic dotnet tools using DNX-hosted version
|
echo Building basic dotnet tools using older dotnet SDK version
|
||||||
|
|
||||||
|
set DOTNET_HOME=%STAGE0_DIR%
|
||||||
|
|
||||||
|
call %~dp0dnvm2 upgrade
|
||||||
|
if errorlevel 1 goto fail
|
||||||
|
|
||||||
echo Building stage1 dotnet.exe ...
|
echo Building stage1 dotnet.exe ...
|
||||||
call "%DOTNET_PUBLISH%" --framework dnxcore50 --runtime win7-x64 --output "%STAGE1_DIR%" "%REPOROOT%\src\Microsoft.DotNet.Cli"
|
dotnet --framework dnxcore50 --runtime win7-x64 --output "%STAGE1_DIR%" "%REPOROOT%\src\Microsoft.DotNet.Cli"
|
||||||
if errorlevel 1 goto fail
|
if errorlevel 1 goto fail
|
||||||
|
|
||||||
echo Building stage1 dotnet-compile.exe ...
|
echo Building stage1 dotnet-compile.exe ...
|
||||||
call "%DOTNET_PUBLISH%" --framework dnxcore50 --runtime win7-x64 --output "%STAGE1_DIR%" "%REPOROOT%\src\Microsoft.DotNet.Tools.Compiler"
|
dotnet --framework dnxcore50 --runtime win7-x64 --output "%STAGE1_DIR%" "%REPOROOT%\src\Microsoft.DotNet.Tools.Compiler"
|
||||||
if errorlevel 1 goto fail
|
if errorlevel 1 goto fail
|
||||||
|
|
||||||
echo Building stage1 dotnet-publish.exe ...
|
echo Building stage1 dotnet-publish.exe ...
|
||||||
call "%DOTNET_PUBLISH%" --framework dnxcore50 --runtime win7-x64 --output "%STAGE1_DIR%" "%REPOROOT%\src\Microsoft.DotNet.Tools.Publish"
|
dotnet --framework dnxcore50 --runtime win7-x64 --output "%STAGE1_DIR%" "%REPOROOT%\src\Microsoft.DotNet.Tools.Publish"
|
||||||
if errorlevel 1 goto fail
|
if errorlevel 1 goto fail
|
||||||
|
|
||||||
echo Re-building dotnet tools with the bootstrapped version
|
echo Re-building dotnet tools with the bootstrapped version
|
||||||
|
|
10
scripts/dnvm2.cmd
Normal file
10
scripts/dnvm2.cmd
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
@Echo off
|
||||||
|
|
||||||
|
set DNVM_CMD_PATH_FILE="%DOTNET_HOME%\.dotnet\temp-set-envvars.cmd"
|
||||||
|
|
||||||
|
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';$CmdPathFile='%DNVM_CMD_PATH_FILE%';& '%~dp0dnvm2.ps1' %*"
|
||||||
|
|
||||||
|
IF EXIST %DNVM_CMD_PATH_FILE% (
|
||||||
|
CALL %DNVM_CMD_PATH_FILE%
|
||||||
|
DEL %DNVM_CMD_PATH_FILE%
|
||||||
|
)
|
1800
scripts/dnvm2.ps1
Normal file
1800
scripts/dnvm2.ps1
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue