Skip to content

Commit

Permalink
feat(iprod-379): .nvmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
geka-evk committed Feb 23, 2024
1 parent c07f5a0 commit 3cbece8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ defaults_configure_nvm: &defaults_configure_nvm
else
echo "==> NVM_DIR already exists - $NVM_DIR"
fi
echo "2. Check/Set NVMRC_VERSION env variable"
if [ -z "$NVMRC_VERSION" ]; then
echo "==> Configuring NVMRC_VERSION!"
export NVMRC_VERSION=$(cat $CIRCLE_WORKING_DIRECTORY/.nvmrc)
echo "export NVMRC_VERSION=$NVMRC_VERSION" >> $ENV_DOT_PROFILE
fi
echo "NVMRC_VERSION is $NVMRC_VERSION"
echo "3. Configure NVM"
## Lets check if an existing NVM_DIR exists, if it does lets skil
if [ -e "$NVM_DIR" ]; then
Expand All @@ -91,7 +94,7 @@ defaults_configure_nvm: &defaults_configure_nvm
else
echo "==> $NVM_DIR does not exists. Executing steps 4-5!"
echo "4. Installing NVM"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
echo "5. Executing $NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
fi
Expand Down

0 comments on commit 3cbece8

Please sign in to comment.