Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add NonInteractive to nuget restore #95

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/templates/deploy.batch.aspnet.wap.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo Handling .NET Web Application deployment.

:: 1. Restore NuGet packages
IF /I "{SolutionPath}" NEQ "" (
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\{SolutionPath}"
call :ExecuteCmd %NUGETRESTORE% "%DEPLOYMENT_SOURCE%\{SolutionPath}"
IF !ERRORLEVEL! NEQ 0 goto error
)

Expand Down
2 changes: 1 addition & 1 deletion lib/templates/deploy.batch.dotnetconsole.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo Handling .NET Console Application deployment.

:: 1. Restore NuGet packages
IF /I "{SolutionPath}" NEQ "" (
call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\{SolutionPath}" -MSBuildPath "%MSBUILD_15_DIR%"
call :ExecuteCmd %NUGETRESTORE% "%DEPLOYMENT_SOURCE%\{SolutionPath}"
IF !ERRORLEVEL! NEQ 0 goto error
)

Expand Down
2 changes: 1 addition & 1 deletion lib/templates/deploy.batch.functionmsbuild.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
echo Handling function App deployment with Msbuild.

:: 1. Restore nuget packages
call :ExecuteCmd nuget.exe restore "%DEPLOYMENT_SOURCE%\{RestoreArguments}" -MSBuildPath "%MSBUILD_15_DIR%"
call :ExecuteCmd %NUGETRESTORE% "%DEPLOYMENT_SOURCE%\{RestoreArguments}"
IF !ERRORLEVEL! NEQ 0 goto error

:: 2. Build and publish
Expand Down
2 changes: 2 additions & 0 deletions lib/templates/deploy.batch.prefix.template
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ IF NOT DEFINED KUDU_SYNC_CMD (
:: Locally just running "kuduSync" would also work
SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)

SET NUGETRESTORE=nuget restore -NonInteractive -MSBuildPath "%MSBUILD_15_DIR%"
2 changes: 1 addition & 1 deletion lib/templates/deploy.posh.aspnet.wap.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "Handling .NET Web Application deployment."

# 1. Restore NuGet packages
if (Test-Path "{SolutionPath}") {
nuget restore "$DEPLOYMENT_SOURCE\{SolutionPath}"
$NUGETRESTORE "$DEPLOYMENT_SOURCE\{SolutionPath}"
exitWithMessageOnError "NuGet restore failed"
}

Expand Down
2 changes: 1 addition & 1 deletion lib/templates/deploy.posh.dotnetconsole.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "Handling .NET Console Application deployment."

# 1. Restore NuGet packages
if (Test-Path "{SolutionPath}") {
nuget restore "$DEPLOYMENT_SOURCE\{SolutionPath}"
$NUGETRESTORE "$DEPLOYMENT_SOURCE\{SolutionPath}"
exitWithMessageOnError "NuGet restore failed"
}

Expand Down
1 change: 1 addition & 0 deletions lib/templates/deploy.posh.prefix.template
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ $DEPLOYMENT_TARGET = $env:DEPLOYMENT_TARGET

$NEXT_MANIFEST_PATH = $env:NEXT_MANIFEST_PATH
$PREVIOUS_MANIFEST_PATH = $env:PREVIOUS_MANIFEST_PATH
$NUGETRESTORE = "nuget restore -NonInteractive -MSBuildPath `"$env:MSBUILD_15_DIR`""

if ($DEPLOYMENT_SOURCE -eq $null) {
$DEPLOYMENT_SOURCE = $SCRIPT_DIR
Expand Down