Commit 35aeadd3 by Dane Springmeyer

handle unbound variable in nvm.sh

parent 5b7e2515
......@@ -2,10 +2,27 @@
set -u -e
function publish() {
if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
node-pre-gyp publish
node-pre-gyp info
node-pre-gyp clean
make clean
# now install from binary
INSTALL_RESULT=$(npm install --fallback-to-build=false > /dev/null)$? || true
# if install returned non zero (errored) then we first unpublish and then call false so travis will bail at this line
if [[ $INSTALL_RESULT != 0 ]]; then echo "returned $INSTALL_RESULT";node-pre-gyp unpublish;false; fi
# If success then we arrive here so lets clean up
node-pre-gyp clean
fi
}
if [[ ! -d ../.nvm ]]; then
git clone https://github.com/creationix/nvm.git ../.nvm
fi
set +u
source ../.nvm/nvm.sh
set -u
nvm install $NODE_VERSION
nvm use $NODE_VERSION
node --version
......@@ -16,19 +33,7 @@ npm install --build-from-source
node-pre-gyp package testpackage
npm test
PUBLISH_BINARY=false
if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
node-pre-gyp publish
node-pre-gyp info
node-pre-gyp clean
make clean
# now install from binary
INSTALL_RESULT=$(npm install --fallback-to-build=false > /dev/null)$? || true
# if install returned non zero (errored) then we first unpublish and then call false so travis will bail at this line
if [[ $INSTALL_RESULT != 0 ]]; then echo "returned $INSTALL_RESULT";node-pre-gyp unpublish;false; fi
# If success then we arrive here so lets clean up
node-pre-gyp clean
fi
publish
# now test building against shared sqlite
if [[ $(uname -s) == 'Darwin' ]]; then
......@@ -55,11 +60,8 @@ if [[ $(uname -s) == 'Linux' ]]; then
# install 32 bit compiler toolchain and X11
# test source compile in 32 bit mode with internal libsqlite3
CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source
npm install --build-from-source
npm test
if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
node-pre-gyp package publish
fi
publish
make clean
# test source compile in 32 bit mode against external libsqlite3
sudo apt-get -y install libsqlite3-dev:i386
......
......@@ -5,7 +5,9 @@ set -u -e
if [[ ! -d ../.nvm ]]; then
git clone https://github.com/creationix/nvm.git ../.nvm
fi
set +u
source ../.nvm/nvm.sh
set -u
nvm install 0.10
nvm use 0.10
node --version
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment