enable additional NuGet restore sources to be passed in

This commit is contained in:
Brett V. Forsgren 2017-11-02 15:51:55 -07:00
Родитель 26b66fbdf2
Коммит 61660da0a3
2 изменённых файлов: 19 добавлений и 8 удалений

Просмотреть файл

@ -571,17 +571,23 @@ if "%RestorePackages%" == "true" (
@if ERRORLEVEL 1 echo Error: Paket restore failed && goto :failure @if ERRORLEVEL 1 echo Error: Paket restore failed && goto :failure
%_ngenexe% install %_nugetexe% /nologo %_ngenexe% install %_nugetexe% /nologo
set _nugetoptions=-PackagesDirectory packages -ConfigFile %_nugetconfig%
if not "%PB_RESTORESOURCE%" == "" (
set _nugetoptions=!_nugetoptions! -Source %PB_RESTORESOURCE%
)
%_nugetexe% restore packages.config -PackagesDirectory packages -ConfigFile %_nugetconfig% echo _nugetoptions=!_nugetoptions!
%_nugetexe% restore packages.config !_nugetoptions!
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure @if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
if "%BUILD_VS%" == "1" ( if "%BUILD_VS%" == "1" (
%_nugetexe% restore vsintegration\packages.config -PackagesDirectory packages -ConfigFile %_nugetconfig% %_nugetexe% restore vsintegration\packages.config !_nugetoptions!
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure @if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
) )
if "%BUILD_SETUP%" == "1" ( if "%BUILD_SETUP%" == "1" (
%_nugetexe% restore setup\packages.config -PackagesDirectory packages -ConfigFile %_nugetconfig% %_nugetexe% restore setup\packages.config !_nugetoptions!
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure @if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
) )
) )

Просмотреть файл

@ -433,20 +433,25 @@ if [ "${RestorePackages:-true}" = 'true' ]; then
exit $exit_code exit $exit_code
fi fi
eval "$_nugetexe restore packages.config -PackagesDirectory packages -ConfigFile $_nugetconfig" _nugetoptions="-PackagesDirectory packages -ConfigFile $_nugetconfig"
if [ "$PB_RESTORESOURCE" != "" ]; then
_nugetoptions="$_nugetoptions -Source $PB_RESTORESOURCE"
fi
eval "$_nugetexe restore packages.config $_nugetoptions"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
failwith "Nuget restore failed" failwith "Nuget restore failed"
fi fi
if [ "$BUILD_VS" = '1' ]; then if [ "$BUILD_VS" = '1' ]; then
eval "$_nugetexe restore vsintegration/packages.config -PackagesDirectory packages -ConfigFile $_nugetconfig" eval "$_nugetexe restore vsintegration/packages.config $_nugetoptions"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
failwith "Nuget restore failed" failwith "Nuget restore failed"
fi fi
fi fi
if [ "$BUILD_SETUP" = '1' ]; then if [ "$BUILD_SETUP" = '1' ]; then
eval "$_nugetexe restore setup/packages.config -PackagesDirectory packages -ConfigFile $_nugetconfig" eval "$_nugetexe restore setup/packages.config $_nugetoptions"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
failwith "Nuget restore failed" failwith "Nuget restore failed"
fi fi