#!/bin/bash
set -e

# setup nvm
if [[ "$OSTYPE" == "darwin"* ]]; then
	export NVM_DIR=~/.nvm
	source $(brew --prefix nvm)/nvm.sh
else
	source $NVM_DIR/nvm.sh
fi

# install node
NODE_VERSION=8.9.1
nvm install $NODE_VERSION
nvm use $NODE_VERSION

# install yarn
npm i -g yarn
#!/bin/bash
set -e

# setup nvm
mv ../../../.nvmrc nvmrc # Remove for init otherwise nvm init could fail
if [[ "$OSTYPE" == "darwin"* ]]; then
	export NVM_DIR=~/.nvm
	source $(brew --prefix nvm)/nvm.sh
else
	source $NVM_DIR/nvm.sh
fi
mv nvmrc ../../../.nvmrc

# install node
NODE_VERSION=8.9.1
nvm install $NODE_VERSION
nvm use $NODE_VERSION

# install yarn
npm i -g yarn
Move .nvmrc before nvm init in CI
Move .nvmrc before nvm init in CI

.nvmrc was causing nvm.sh to fail with code 3 because v8.9.2 is not installed
on clean machines.
