From 08ee965270bde07547df1e6921abd1fbb43b5eb2 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 15 May 2018 16:54:25 -0400 Subject: [PATCH] Fix pr builds --- appveyor.yml | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 16c51f93013..cb0c8a67db5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,5 @@ version: 1.0.{build} build_cloud: electron-16 -skip_branch_with_pr: true image: electron-16-vs2017 environment: DISABLE_CRASH_REPORTER_TESTS: true @@ -9,33 +8,38 @@ environment: - TARGET_ARCH: x64 build_script: - ps: >- - Add-Path "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64" + if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) { + Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild - $env:path = "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64;$env:path" - - $Message = (git log --format=%B -n 1 HEAD) | Out-String - - if ((Test-Path Env:\RUN_RELEASE_BUILD)) { - $env:ELECTRON_RELEASE = '1' - Write-Output "release build triggered from api" - } - - if ((Test-Path Env:\ELECTRON_RELEASE)) { - Write-Output "Running release build" - python script\bootstrap.py --target_arch=$env:TARGET_ARCH - python script\build.py -c R - python script\create-dist.py } else { - Write-Output "Running debug build" - python script\bootstrap.py --target_arch=$env:TARGET_ARCH --dev - python script\build.py -c D + Add-Path "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64" + + $env:path = "$env:ProgramFiles (x86)\Windows Kits\10\Debuggers\x64;$env:path" + + $Message = (git log --format=%B -n 1 HEAD) | Out-String + + if ((Test-Path Env:\RUN_RELEASE_BUILD)) { + $env:ELECTRON_RELEASE = '1' + Write-Output "release build triggered from api" + } + + if ((Test-Path Env:\ELECTRON_RELEASE)) { + Write-Output "Running release build" + python script\bootstrap.py --target_arch=$env:TARGET_ARCH + python script\build.py -c R + python script\create-dist.py + } else { + Write-Output "Running debug build" + python script\bootstrap.py --target_arch=$env:TARGET_ARCH --dev + python script\build.py -c D + } + if ($? -ne 'True') { + throw "Build failed with exit code $?" + } else { + "Build succeeded." + } } - if ($? -ne 'True') { - throw "Build failed with exit code $?" - } else { - "Build succeeded." - } test_script: - ps: >- if (Test-Path Env:\ELECTRON_RELEASE) {