Skip to content

Commit 23ddbb4

Browse files
only nuget.exe when missing
1 parent e03f064 commit 23ddbb4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

build.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ if ($env:APPVEYOR_PULL_REQUEST_NUMBER)
1818
$versionSuffix = "PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER
1919
}
2020

21-
# download nuget.exe
22-
23-
$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
2421
$targetNugetExe = "tools\nuget.exe"
25-
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
22+
if (-Not (test-path $targetNugetExe))
23+
{
24+
# download nuget.exe
25+
$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
26+
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
27+
}
2628

27-
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
29+
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
2830
if (-Not $LastExitCode -eq 0)
2931
{ exit $LastExitCode }
3032

0 commit comments

Comments
 (0)