Skip to content

Commit

Permalink
Enforce the installation of a specific Node version
Browse files Browse the repository at this point in the history
This will help ensure a consistent major version of Node is
installed on each platform.
  • Loading branch information
hwillson committed Aug 11, 2020
1 parent 9250d56 commit 773a464
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions scripts/install-node.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 773a464

Please sign in to comment.