fix && to exit subshell with -e on failure

This commit is contained in:
Mike Morris
2015-08-28 16:27:38 -04:00
parent ef6392234e
commit ca794eb56d
2 changed files with 16 additions and 5 deletions

View File

@@ -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

View File

@@ -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