Skip to content

Commit

Permalink
Auto-release compiled modules from Travis CI
Browse files Browse the repository at this point in the history
This closes #470, closes #473 and closes #467
  • Loading branch information
recrsn committed Aug 19, 2018
1 parent 50bd6cb commit 18efb66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -26,12 +26,11 @@ before_install:
- echo Building for Node $TRAVIS_NODE_VERSION
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=$LINUX_CXX; $CXX --version; fi;
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then c++ --version; fi;
- if [[ "$TRAVIS_NODE_VERSION" == "4" || "$TRAVIS_NODE_VERSION" == "5" ]]; then npm install -g npm@5; else npm install -g npm@latest; fi;
- if [[ "$TRAVIS_NODE_VERSION" -lt "6" ]]; then npm install -g npm@5; else npm install -g npm@latest; fi;

install: true

script: npm test

after_success:
- REGEX='^v(0|[1-9]+)\.(0|[1-9]+)\.(0|[1-9]+)$'
- if [[ $TRAVIS_TAG =~ $REGEX ]] || [[ $TRAVIS_COMMIT_MESSAGE == *"publish binary"* ]]; then echo "Publishing"; npm install node-pre-gyp-github; ./node_modules/.bin/node-pre-gyp configure; ./node_modules/.bin/node-pre-gyp build; ./node_modules/.bin/node-pre-gyp package; ./node_modules/.bin/node-pre-gyp-github publish --release; fi;
- if [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then echo "Publishing"; npm install node-pre-gyp-github@1.3.1; ./node_modules/.bin/node-pre-gyp configure; ./node_modules/.bin/node-pre-gyp build; ./node_modules/.bin/node-pre-gyp package; ./node_modules/.bin/node-pre-gyp-github publish --release; fi;
4 changes: 3 additions & 1 deletion appveyor.yml
Expand Up @@ -38,5 +38,7 @@ test_script:
- npm --version
- npm test

after_test:
on_success:
- .\node_modules\.bin\node-pre-gyp package
- ps: if $APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -like '*publish binary*' { echo "Publishing"; npm install node-pre-gyp-github@1.3.1; ./node_modules/.bin/node-pre-gyp configure; ./node_modules/.bin/node-pre-gyp build; ./node_modules/.bin/node-pre-gyp package; ./node_modules/.bin/node-pre-gyp-github publish --release }

6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -59,8 +59,8 @@
"binary": {
"module_name": "bcrypt_lib",
"module_path": "./lib/binding/",
"host": "https://github.com",
"remote_path": "/kelektiv/node.bcrypt.js/releases/download/v{version}/",
"package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}-{libc}.tar.gz"
"package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}-{libc}.tar.gz",
"host": "https://github.com/kelektiv/node.bcrypt.js/releases/download/",
"remote_path": "v{version}"
}
}

1 comment on commit 18efb66

@ilatypov
Copy link
Contributor

@ilatypov ilatypov commented on 18efb66 Aug 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #646 by accidentally working around the awkward URL customization in node-pre-gyp when installing binary releases of crypt past 3.0.0 from a local artifactory.

Please sign in to comment.