[node] simpler PACKAGE_JSON_VERSION

This commit is contained in:
Mike Morris
2015-12-01 13:51:40 -05:00
parent 622f6691b7
commit 4dc4eef83e
3 changed files with 1 additions and 8 deletions

View File

@@ -28,7 +28,6 @@
"aws-sdk": "^2.2.19",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#744b63be01e36c75c6e629aec16a53048c0b7dbc",
"node-gyp": "^3.2.0",
"read-package-json": "^2.0.2",
"request": "^2.67.0",
"tape": "^4.2.2"
},

View File

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

View File

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