Files
runner-images/images/macos/scripts/build/install-node.sh
Alexey-Ayupov 5a6e215859 [macOS] Refactor the rest of the scripts (#9113)
* [macOS] Refactor the rest of the scripts

* Return quotes to config tccdb script

* Return quotes to config tccdb script

* Revert some changes in ruby scripts

* Revert some changes in ruby scripts

* Revert some changes chrome script

* check errors

* check errors 01

* find errors in common-utils

* find errors in edge install

* find errors in edge install

---------

Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
2024-01-09 14:47:31 +01:00

28 lines
831 B
Bash

#!/bin/bash -e -o pipefail
################################################################################
## File: install-node.sh
## Desc: Install Node.js
################################################################################
source ~/utils/utils.sh
defaultVersion=$(get_toolset_value '.node.default')
echo "Installing Node.js $defaultVersion"
brew_smart_install "node@$defaultVersion"
brew link node@$defaultVersion --force --overwrite
echo Installing yarn...
yarn_installer_path=$(download_with_retry "https://yarnpkg.com/install.sh")
bash $yarn_installer_path
if is_BigSur || 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"