-
-
Notifications
You must be signed in to change notification settings - Fork 832
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed download of local NuGet.exe copy and cleaned up formatting in…
… build.cmd.
- Loading branch information
Showing
1 changed file
with
31 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,59 @@ | ||
@echo off | ||
pushd %~dp0 | ||
@ECHO OFF | ||
|
||
SETLOCAL | ||
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe | ||
|
||
IF EXIST %CACHED_NUGET% goto copynuget | ||
echo Downloading latest version of NuGet.exe... | ||
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet | ||
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" | ||
|
||
:copynuget | ||
IF EXIST .nuget\nuget.exe goto dnvminstall | ||
md .nuget | ||
copy %CACHED_NUGET% .nuget\nuget.exe > nul | ||
PUSHD %~dp0 | ||
|
||
:dnvminstall | ||
set "DNX_NUGET_API_URL=https://www.nuget.org/api/v2" | ||
setlocal EnableDelayedExpansion | ||
SETLOCAL EnableDelayedExpansion | ||
where dnvm | ||
if %ERRORLEVEL% neq 0 ( | ||
IF %ERRORLEVEL% neq 0 ( | ||
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}" | ||
set PATH=!PATH!;!userprofile!\.dnx\bin | ||
set DNX_HOME=!USERPROFILE!\.dnx | ||
goto install | ||
SET PATH=!PATH!;!userprofile!\.dnx\bin | ||
SET DNX_HOME=!USERPROFILE!\.dnx | ||
GOTO install | ||
) | ||
|
||
:install | ||
call dnvm install 1.0.0-beta5-11511 -r CoreCLR | ||
call dnvm install 1.0.0-beta5-11511 -r CLR | ||
CALL dnvm install 1.0.0-beta5-11511 -r CoreCLR | ||
CALL dnvm install 1.0.0-beta5-11511 -r CLR | ||
|
||
:restore | ||
call dnu restore src\Autofac | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnu restore src\Autofac | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
call dnu restore src\Autofac.Dnx | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnu restore src\Autofac.Dnx | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
call dnu restore test\Autofac.Test | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnu restore test\Autofac.Test | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
call dnu restore test\Autofac.Dnx.Test | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnu restore test\Autofac.Dnx.Test | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
:pack | ||
SETLOCAL ENABLEEXTENSIONS | ||
IF ERRORLEVEL 1 ECHO Unable to enable extensions | ||
IF DEFINED APPVEYOR_BUILD_NUMBER (SET DNX_BUILD_VERSION=%APPVEYOR_BUILD_NUMBER%) ELSE (SET DNX_BUILD_VERSION=1) | ||
ECHO DNX_BUILD_VERSION=%DNX_BUILD_VERSION% | ||
|
||
call dnu pack src\Autofac --configuration Release --out artifacts\packages | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnu pack src\Autofac --configuration Release --out artifacts\packages | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
call dnu pack src\Autofac.Dnx --configuration Release --out artifacts\packages | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnu pack src\Autofac.Dnx --configuration Release --out artifacts\packages | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
:test | ||
call dnx test\Autofac.Test test | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnx test\Autofac.Test test | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
call dnx test\Autofac.Dnx.Test test | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnx test\Autofac.Dnx.Test test | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
call dnvm use 1.0.0-beta5-11511 -r CoreCLR | ||
CALL dnvm use 1.0.0-beta5-11511 -r CoreCLR | ||
|
||
call dnx test\Autofac.Test test | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnx test\Autofac.Test test | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
call dnx test\Autofac.Dnx.Test test | ||
if %errorlevel% neq 0 exit /b %errorlevel% | ||
CALL dnx test\Autofac.Dnx.Test test | ||
IF %errorlevel% neq 0 EXIT /b %errorlevel% | ||
|
||
popd | ||
POPD |