From 773a4643927fe1e6f1d5a521c6a93b244c0e8948 Mon Sep 17 00:00:00 2001 From: hwillson Date: Tue, 11 Aug 2020 08:46:50 -0400 Subject: [PATCH] Enforce the installation of a specific Node version This will help ensure a consistent major version of Node is installed on each platform. --- .circleci/config.yml | 3 +++ scripts/install-node.sh | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100755 scripts/install-node.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 5050547163..4c57436b7a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,6 +33,9 @@ commands: - restore_cache: key: starwars-server - checkout + - run: + command: ./scripts/install-node.sh + name: Install Node - run: command: ./scripts/install-or-update-starwars-server.sh name: Install/Update StarWars Server diff --git a/scripts/install-node.sh b/scripts/install-node.sh new file mode 100755 index 0000000000..713ec98a9f --- /dev/null +++ b/scripts/install-node.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +touch $BASH_ENV +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash +echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV +echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV +echo nvm install 12 >> $BASH_ENV +echo nvm alias default 12 >> $BASH_ENV +echo nvm use default >> $BASH_ENV \ No newline at end of file