|
| 1 | +branches: |
| 2 | + only: |
| 3 | + - master |
| 4 | + - /^v?[0-9]/ |
| 5 | + |
1 | 6 | environment: |
2 | 7 | GYP_MSVS_VERSION: 2013 |
3 | 8 |
|
4 | | - node_pre_gyp_accessKeyId: |
5 | | - secure: lYXAEyCIM03tC8M9oS4U1JXWbo+g9u+AnayYjekgqBQ= |
6 | | - node_pre_gyp_secretAccessKey: |
7 | | - secure: yRw0LuKh8Q/BORVLbBMaZXyGIvpIYuxYzGSherheoYTEMONUYfgj49x8b/FUm4s1 |
8 | | - |
9 | 9 | matrix: |
10 | | - - node_version: '0.12.7' |
11 | | - - node_version: '1.0' |
12 | | - - node_version: '1.8' |
13 | | - - node_version: '2.5' |
14 | | - - node_version: '3.3' |
15 | | - - node_version: '4.1' |
16 | | - - node_version: '5.0' |
| 10 | + - node_version: '0.12' |
| 11 | + - node_version: '4' |
| 12 | + - node_version: '5' |
| 13 | + - node_version: '6' |
17 | 14 |
|
18 | 15 | install: |
19 | 16 | - ps: Install-Product node $env:node_version $env:platform |
20 | | - - ps: npm install -g node-gyp |
21 | | - - ps: $publish_binary=0 |
22 | | - - ps: if ($env:appveyor_repo_tag -match "true" -and $env:appveyor_repo_tag_name -match '^v[0-9]') { $publish_binary=1; } |
| 17 | + - ps: npm install -g node-gyp node-pre-gyp-github |
| 18 | + # This fixes an issue with Node 4.x on x86. If it builds without this line |
| 19 | + # needing to be set, we can remove it. |
| 20 | + - ps: npm config -g set node-gyp "$(npm config -g get prefix)\node_modules\node-gyp\bin\node-gyp.js" |
| 21 | + |
| 22 | + - ps: if ($env:appveyor_repo_tag -match "true" -and $env:appveyor_repo_tag_name -match '^v?[0-9]') { $publish_binary=1; } |
23 | 23 |
|
24 | 24 | build_script: |
25 | 25 | - ps: echo $publish_binary |
26 | | - - ps: > |
27 | | - & { |
28 | | - $ErrorActionPreference = 'SilentlyContinue' |
29 | | - git submodule update --init 2>&1 | write-host |
30 | | - npm install --build-from-source 2>&1 | write-host |
31 | | - ./node_modules/.bin/node-pre-gyp package 2>&1 | write-host |
32 | | - if ($publish_binary) { ./node_modules/.bin/node-pre-gyp publish 2>&1 | write-host; } |
| 26 | + - ps: | |
| 27 | + $ErrorActionPreference = 'Continue' |
| 28 | + git submodule update --init 2>&1 | write-host |
| 29 | + npm install --build-from-source 2>&1 | write-host |
| 30 | + ./node_modules/.bin/node-pre-gyp package 2>&1 | write-host |
| 31 | + if ($publish_binary -Eq "1") { |
| 32 | + node-pre-gyp-github publish 2>&1 | write-host |
| 33 | + if (-Not ($?)) { |
| 34 | + throw "Failed publishing"; |
| 35 | + } |
33 | 36 | } |
| 37 | + echo "done." |
34 | 38 |
|
35 | 39 | platform: |
36 | 40 | - x86 |
|
0 commit comments