[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”>
This commit is contained in:
Alexey-Ayupov
2024-01-09 14:47:31 +01:00
committed by GitHub
parent 5bdda2e8c2
commit 5a6e215859
48 changed files with 203 additions and 264 deletions

View File

@@ -13,32 +13,32 @@ arch=$(get_arch)
# Download installer from dot.net and keep it locally
DOTNET_INSTALL_SCRIPT="https://dot.net/v1/dotnet-install.sh"
install_script_path=$(download_with_retry $DOTNET_INSTALL_SCRIPT)
chmod +x "$install_script_path"
chmod +x $install_script_path
args_list=()
echo "Parsing dotnet SDK (except rc and preview versions) from .json..."
dotnet_versions=($(get_toolset_value ".dotnet.arch[\"$arch\"].versions | .[]"))
for dotnet_version in "${dotnet_versions[@]}"; do
for dotnet_version in ${dotnet_versions[@]}; do
release_url="https://raw.githubusercontent.com/dotnet/core/main/release-notes/${dotnet_version}/releases.json"
releases_json_file=$(download_with_retry "$release_url")
if [[ $dotnet_version == "6.0" ]]; then
args_list+=(
$(cat "$releases_json_file" | jq -r 'first(.releases[].sdks[]?.version | select(contains("preview") or contains("rc") | not))')
$(cat $releases_json_file | jq -r 'first(.releases[].sdks[]?.version | select(contains("preview") or contains("rc") | not))')
)
else
args_list+=(
$(cat "$releases_json_file" | \
$(cat $releases_json_file | \
jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*' | \
sort -r | rev | uniq -s 2 | rev)
)
fi
done
for ARGS in "${args_list[@]}"; do
"$install_script_path" --version $ARGS -NoPath --arch $arch
for ARGS in ${args_list[@]}; do
$install_script_path --version $ARGS -NoPath --arch $arch
done
# dotnet installer doesn't create symlink to executable in /user/local/bin
@@ -46,12 +46,12 @@ done
ln -s ~/.dotnet/dotnet /usr/local/bin/dotnet
# Validate installation
if [ $(dotnet --list-sdks | wc -l) -lt "1" ]; then
if [[ $(dotnet --list-sdks | wc -l) -lt "1" ]]; then
echo "The .NET Core SDK is not installed"
exit 1
fi
echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> "$HOME/.bashrc"
echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> $HOME/.bashrc
echo "Dotnet operations have been completed successfully..."
invoke_tests "Common" ".NET"