summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2015-08-28 16:27:38 -0400
committerMike Morris <michael.patrick.morris@gmail.com>2015-08-28 16:27:38 -0400
commitca794eb56d90b3b737f25c99d2378e91eb0cc7e8 (patch)
tree1dfbfad6521e86ecf46aa25f652d773ece2823de /scripts
parentef6392234ec4fa30d0cc89041ebc8d9470b1a35b (diff)
downloadqtlocation-mapboxgl-ca794eb56d90b3b737f25c99d2378e91eb0cc7e8.tar.gz
fix && to exit subshell with -e on failure
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/node/install.sh7
-rwxr-xr-xscripts/node/run.sh14
2 files changed, 16 insertions, 5 deletions
diff --git a/scripts/node/install.sh b/scripts/node/install.sh
index b6196dda9d..6d62735998 100755
--- a/scripts/node/install.sh
+++ b/scripts/node/install.sh
@@ -17,11 +17,16 @@ if [ ! -d ~/.nvm ]; then
git clone https://github.com/creationix/nvm.git ~/.nvm
fi
-pushd ~/.nvm && git fetch && git checkout `git describe --abbrev=0 --tags` && popd
+pushd ~/.nvm
+git fetch
+git checkout `git describe --abbrev=0 --tags`
+popd
+
source ~/.nvm/nvm.sh
mapbox_time $NODE_VERSION \
nvm install $NODE_VERSION
+
nvm alias default $NODE_VERSION
node --version
diff --git a/scripts/node/run.sh b/scripts/node/run.sh
index 5e11ab7514..b424529767 100755
--- a/scripts/node/run.sh
+++ b/scripts/node/run.sh
@@ -17,8 +17,10 @@ nvm use $NODE_VERSION
mapbox_time "checkout_styles" \
git submodule update --init styles
+pushd platform/node
mapbox_time "compile_program" \
-pushd platform/node && npm install --build-from-source && popd
+npm install --build-from-source
+popd
################################################################################
# Test
@@ -29,11 +31,13 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
mapbox_time "checkout_test_suite" \
git submodule update --init test/suite
+ pushd platform/node
mapbox_time "run_tests" \
- pushd platform/node && npm test && popd
+ npm test
mapbox_time "run_render_tests" \
- pushd platform/node && npm run test-suite && popd
+ npm run test-suite
+ popd
if [ ! -z "${AWS_ACCESS_KEY_ID}" ] && [ ! -z "${AWS_SECRET_ACCESS_KEY}" ] ; then
# Install and add awscli to PATH for uploading the results
@@ -41,7 +45,9 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
pip install --user awscli
export PATH="`python -m site --user-base`/bin:${PATH}"
+ pushd test/suite
mapbox_time "deploy_results" \
- pushd test/suite && ./bin/deploy_results.sh && popd
+ ./bin/deploy_results.sh
+ popd
fi
fi