[node] autopublish node-pre-gyp binary

If $TRAVIS_TAG matches with node-v${PACKAGE_JSON_VERSION}.
This commit is contained in:
Mike Morris
2015-11-05 12:40:58 -05:00
parent be16c37e65
commit 3a91686a09
3 changed files with 9 additions and 1 deletions

View File

@@ -11,8 +11,9 @@ else
fi
COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
PACKAGE_JSON_VERSION=$(node ./scripts/node/package-version.js)
if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
if [[ ${TRAVIS_TAG} == node-v${PACKAGE_JSON_VERSION} ]] || test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
source ~/.nvm/nvm.sh
nvm use $NODE_VERSION

View File

@@ -0,0 +1,6 @@
var readJSON = require('read-package-json');
readJSON('package.json', function(err, data) {
if (err) process.stderr.write(err);
process.stdout.write(data.version);
});