From 8429df2ada08274c402dbbedf9411f48fb4589a2 Mon Sep 17 00:00:00 2001 From: amaitland Date: Tue, 18 Nov 2014 14:20:37 +1000 Subject: [PATCH] Simplify check for PR - skip Nupkg Tested locally, should be working correctly now --- build.ps1 | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/build.ps1 b/build.ps1 index 954cd1506..ae01ed659 100644 --- a/build.ps1 +++ b/build.ps1 @@ -218,9 +218,11 @@ function NugetPackageRestore function Nupkg { - if($SkipNugetForPr) + if (Test-Path Env:\APPVEYOR_PULL_REQUEST_NUMBER) { - return; + Write-Diagnostic "Pr Number: $env:APPVEYOR_PULL_REQUEST_NUMBER" + Write-Diagnostic "Skipping Nupkg" + return } $nuget = Join-Path $WorkingDir .\nuget\NuGet.exe @@ -266,17 +268,6 @@ function WriteAssemblyVersion $NewString | Set-Content $Filename -Encoding UTF8 } -function CheckIfPrBuild() -{ - if (Test-Path Env:\APPVEYOR_PULL_REQUEST_NUMBER) - { - Write-Diagnostic "Pr Number: $env:APPVEYOR_PULL_REQUEST_NUMBER" - $SkipNugetForPr = $true - } -} - -CheckIfPrBuild - DownloadNuget NugetPackageRestore