From 23ddbb4e3fb3fd8feaaa5efa1fc739c72489bb01 Mon Sep 17 00:00:00 2001 From: Julian Verdurmen <304NotModified@users.noreply.github.com> Date: Sat, 25 May 2019 00:34:55 +0200 Subject: [PATCH] only nuget.exe when missing --- build.ps1 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/build.ps1 b/build.ps1 index 383450b19c..87b1b7b01a 100644 --- a/build.ps1 +++ b/build.ps1 @@ -18,13 +18,15 @@ if ($env:APPVEYOR_PULL_REQUEST_NUMBER) $versionSuffix = "PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER } -# download nuget.exe - -$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" $targetNugetExe = "tools\nuget.exe" -Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe +if (-Not (test-path $targetNugetExe)) +{ + # download nuget.exe + $sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" + Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe +} -msbuild /t:Restore,Pack .\src\NLog\ /p:targetFrameworks='"net45;net40-client;net35;netstandard1.3;netstandard1.5;netstandard2.0;sl4;sl5;wp8;monoandroid44;xamarinios10"' /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ProductVersion=$versionProduct /p:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=..\..\artifacts /verbosity:minimal +msbuild /t:Restore,Pack .\src\NLog\ /p:targetFrameworks='"net45;net40-client;net35;netstandard1.3;netstandard1.5;netstandard2.0;sl4;sl5;wp8;monoandroid44;xamarinios10"' /p:VersionPrefix=$versionPrefix /p:VersionSuffix=$versionSuffix /p:FileVersion=$versionFile /p:ProductVersion=$versionProduct /p:Configuration=Release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=..\..\artifacts /verbosity:minimal /maxcpucount if (-Not $LastExitCode -eq 0) { exit $LastExitCode }