Skip to content

Commit

Permalink
fix(appveyor): update script to include debug msg and wrap conditiona…
Browse files Browse the repository at this point in the history
…ls (#26)
  • Loading branch information
jshor committed Dec 14, 2019
1 parent fc6f29a commit 2859265
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</a>

<a href="https://ci.appveyor.com/project/jshor/symbology">
<img src="https://img.shields.io/travis/jshor/symbology?logo=appveyor&style=for-the-badge"
<img src="https://img.shields.io/appveyor/ci/jshor/symbology?logo=appveyor&style=for-the-badge"
alt="Build status: AppVeyor">
</a>

Expand Down
7 changes: 6 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ build_script:
- yarn package:binary

on_success:
- ps: ./scripts/appveyor.ps1 -ErrorActionPreference 'SilentlyContinue'
- ps: >-
if (($env:APPVEYOR_REPO_BRANCH -eq 'master') -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq '')) {
./scripts/appveyor.ps1 -ErrorActionPreference 'SilentlyContinue'
} else {
echo "Skipping publishing stage. Branch '$env:APPVEYOR_REPO_BRANCH' -- 'PR $env:APPVEYOR_PULL_REQUEST_NUMBER'"
}
platform:
- x86
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"package:binary": "node-pre-gyp rebuild package",
"publish:binary": "node-pre-gyp-github publish --silent --release",
"publish:release": "(git push --follow-tags origin HEAD:master && npm publish) || true",
"install": "node ./scripts/install.js"
"install": "node ./scripts/install.js && node-pre-gyp install --fallback-to-build"
},
"main": "./src/index.js",
"author": "Josh Shor <https://github.com/jshor>",
Expand Down
8 changes: 3 additions & 5 deletions scripts/appveyor.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
if ($env:APPVEYOR_REPO_BRANCH -eq 'master' -and $env:APPVEYOR_PULL_REQUEST_NUMBER -eq '') {
try {
yarn publish:binary
} catch { "OK" }
}
try {
yarn publish:binary
} catch { "OK" }

0 comments on commit 2859265

Please sign in to comment.