Created
February 8, 2021 23:44
-
-
Save djuber/09f4d2601faeeb7e1ee21e0e72b596cf to your computer and use it in GitHub Desktop.
steps to pull node and yarn, then install them during circle container prep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# step should have NODE_VERSION and YARN_VERSION environment variables declared | |
- run: | |
name: Download NodeJS things | |
command: | | |
mkdir -p nodejs-downloads/ | |
cd nodejs-downloads/ | |
[ -f node-v${NODE_VERSION}-linux-x64.tar.xz ] || curl -O https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz | |
[ -f yarn-v${YARN_VERSION}.tar.gz ] || curl -O -L https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz | |
- run: | |
name: Install NodeJS things | |
command: | | |
cd nodejs-downloads/ | |
sudo tar -xJ -C /usr/local --strip-components=1 --no-same-owner -f node-v${NODE_VERSION}-linux-x64.tar.xz | |
sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs | |
sudo mkdir -p /opt/yarn | |
sudo tar -xz -C /opt/yarn --strip-components=1 -f yarn-v${YARN_VERSION}.tar.gz | |
sudo ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn | |
sudo ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment