mirror of
https://github.com/mapbox/node-fontnik.git
synced 2026-01-18 15:54:55 +00:00
* update build-glyphs help and building from source instructions * test and build binaries for Node.js v6.x LTS instead of v5.x * make sure we're using correct NODE_VERSION in install.md
24 lines
562 B
Bash
Executable File
24 lines
562 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -o pipefail
|
|
|
|
if [[ ${1:-false} == 'false' ]]; then
|
|
echo "Error: pass node version as first argument"
|
|
exit 1
|
|
fi
|
|
|
|
NODE_VERSION=$1
|
|
|
|
# if an existing nvm is already installed we need to unload it
|
|
nvm unload || true
|
|
|
|
# here we set up the node version on the fly based on the matrix value.
|
|
# This is done manually so that the build works the same on OS X
|
|
rm -rf ./__nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ./__nvm
|
|
set +e
|
|
set +u
|
|
source ./__nvm/nvm.sh
|
|
nvm install ${NODE_VERSION}
|
|
nvm use ${NODE_VERSION}
|