summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2015-12-01 13:51:40 -0500
committerMike Morris <michael.patrick.morris@gmail.com>2015-12-01 13:52:17 -0500
commit4dc4eef83e67f91b66ff22eb27b120ed753c48a2 (patch)
tree0c0bd77e6a216cf61046c130b79034fa22842a32 /scripts
parent622f6691b70d31491773524a03da44515259e2cf (diff)
downloadqtlocation-mapboxgl-4dc4eef83e67f91b66ff22eb27b120ed753c48a2.tar.gz
[node] simpler PACKAGE_JSON_VERSION
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/node/after_script.sh2
-rw-r--r--scripts/node/package-version.js6
2 files changed, 1 insertions, 7 deletions
diff --git a/scripts/node/after_script.sh b/scripts/node/after_script.sh
index 8673b079c8..6ab07fe03d 100755
--- a/scripts/node/after_script.sh
+++ b/scripts/node/after_script.sh
@@ -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
diff --git a/scripts/node/package-version.js b/scripts/node/package-version.js
deleted file mode 100644
index 99b56aee44..0000000000
--- a/scripts/node/package-version.js
+++ /dev/null
@@ -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);
-});