Merge pull request #3876 from brettfo/nuget-sources

enable additional NuGet restore sources to be passed in
This commit is contained in:
Kevin Ransom (msft) 2017-11-03 23:56:59 -07:00 коммит произвёл GitHub
Родитель d903cf6277 61660da0a3
Коммит ae34e3b1c2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 19 добавлений и 8 удалений

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

@ -518,17 +518,23 @@ if "%RestorePackages%" == "true" (
@if ERRORLEVEL 1 echo Error: Paket restore failed && goto :failure
%_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 "%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 "%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
)
)

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

@ -433,20 +433,25 @@ if [ "${RestorePackages:-true}" = 'true' ]; then
exit $exit_code
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
failwith "Nuget restore failed"
fi
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
failwith "Nuget restore failed"
fi
fi
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
failwith "Nuget restore failed"
fi