File tree Expand file tree Collapse file tree 6 files changed +36
-6
lines changed
Expand file tree Collapse file tree 6 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 1- prebuilds /
21build /
32appveyor.yml
43test.js
Original file line number Diff line number Diff line change @@ -7,3 +7,16 @@ node_js:
77os :
88 - linux
99 - osx
10+ before_deploy :
11+ - ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$TRAVIS_OS_NAME-$(uname -m).tar"
12+ - npm run prebuild
13+ - tar --create --verbose --file="$ARCHIVE_NAME" --directory "$TRAVIS_BUILD_DIR/prebuilds" .
14+ deploy :
15+ provider : releases
16+ api_key :
17+ secure : OzQWRAFAR+oJ5uSFn2WwCun5RJDD5HQnPhXdJNj5ErpBy0CmiweF7YwnDhOywncw9Rz+iQEfg4MUCsnSkD0u5LRKmwvED/Y/ddol1VQTBmWREeQqCuGLr/DoD2nEnYoLIZWlIbqSEO3TtDaCuh818XqZhcfHms6jEMyF5WuKD/c=
18+ file : " $ARCHIVE_NAME"
19+ skip_cleanup : true
20+ on :
21+ tags : true
22+ node : " 10"
Original file line number Diff line number Diff line change 1+ build : off
2+ configuration : Release
13environment :
24 matrix :
35 - nodejs_version : " 10"
@@ -15,4 +17,17 @@ test_script:
1517 - node --version
1618 - npm --version
1719 - npm test
18- build : off
20+ after_test :
21+ - ps : If ($env:nodejs_version -eq "10") { npm run prebuild }
22+ - ps : $env:ARTIFACT_NAME_PREFIX = if (Test-Path env:APPVEYOR_REPO_TAG_NAME) { $env:APPVEYOR_REPO_TAG_NAME } else { 'latest' }
23+ artifacts :
24+ - path : prebuilds
25+ name : $(ARTIFACT_NAME_PREFIX)-win-$(PLATFORM)
26+ deploy :
27+ - provider : GitHub
28+ artifact : /.*\.zip/
29+ auth_token :
30+ secure : CkWRNlzH+wmCa3+TRydWfvmSH7tevR81aAypEhXTR9ka5q0Ja8lAIPDwtPb+Ux9l
31+ on :
32+ appveyor_repo_tag : true
33+ nodejs_version : " 10"
Original file line number Diff line number Diff line change 11'use strict' ;
22
33try {
4- module . exports = require ( 'bindings ' ) ( 'bufferutil' ) ;
4+ module . exports = require ( 'node-gyp-build ' ) ( __dirname ) ;
55} catch ( e ) {
66 module . exports = require ( './fallback' ) ;
77}
Original file line number Diff line number Diff line change 44 "description" : " WebSocket buffer utils" ,
55 "main" : " index.js" ,
66 "scripts" : {
7+ "install" : " node-gyp-build" ,
8+ "prebuild" : " prebuildify --napi" ,
79 "test" : " mocha"
810 },
911 "repository" : {
2022 },
2123 "homepage" : " https://github.com/websockets/bufferutil" ,
2224 "dependencies" : {
23- "bindings " : " ~1.3 .0"
25+ "node-gyp-build " : " ~3.4 .0"
2426 },
2527 "devDependencies" : {
26- "mocha" : " ~5.2.0"
28+ "mocha" : " ~5.2.0" ,
29+ "prebuildify" : " ~2.7.0"
2730 }
2831}
Original file line number Diff line number Diff line change @@ -43,5 +43,5 @@ function use(bufferUtil) {
4343 } ;
4444}
4545
46- describe ( 'bindings' , use ( require ( 'bindings ' ) ( 'bufferutil' ) ) ) ;
46+ describe ( 'bindings' , use ( require ( 'node-gyp-build ' ) ( __dirname ) ) ) ;
4747describe ( 'fallback' , use ( require ( './fallback' ) ) ) ;
You can’t perform that action at this time.
0 commit comments