Files
runner-images/images/macos/scripts/build/install-node.sh
T

28 lines
818 B
Bash
Raw Normal View History

#!/bin/bash -e -o pipefail
2023-11-28 02:25:03 +01:00
################################################################################
## File: install-node.sh
## Desc: Install Node.js
################################################################################
2020-09-10 14:34:08 +03:00
source ~/utils/utils.sh
defaultVersion=$(get_toolset_value '.node.default')
2021-11-09 17:49:30 +03:00
echo "Installing Node.js $defaultVersion"
brew_smart_install "node@$defaultVersion"
brew link node@$defaultVersion --force --overwrite
2020-09-10 14:34:08 +03:00
echo Installing yarn...
yarn_installer_path=$(download_with_retry "https://yarnpkg.com/install.sh")
bash $yarn_installer_path
2020-09-10 14:34:08 +03:00
if is_Monterey; then
npm_global_packages=$(get_toolset_value '.npm.global_packages[].name')
for module in ${npm_global_packages[@]}; do
echo "Install $module"
npm install -g $module
done
fi
invoke_tests "Node" "Node.js"