Files
runner-images/images/macos/provision/core/toolcache-high-sierra.sh
Darii Nurgaleev 03ce901f42 [macOS] Pester tests invocation after install - 2. (#2429)
* [macOS] Fail Pester tests on error

* return it back

* added new tests

* added new tests for Macos part2

* fixed nitpicks

* vsmac changes

* remove toolcache fron high sierra
2021-01-20 10:11:00 +03:00

25 lines
880 B
Bash

#!/bin/bash -e -o pipefail
###########################################################################
# The script downloads macos hosted tool cache for several Python versions
# and installs them onto the system
#
###########################################################################
SOURCE_URL="https://vstsagenttools.blob.core.windows.net/tools"
PACKAGES_DIR=/tmp/hostedtoolcache
# Download hosted tool cache with azcopy
azcopy copy $SOURCE_URL $PACKAGES_DIR --include-path "hostedtoolcache/macos-10.13" --recursive
mv $PACKAGES_DIR/tools/hostedtoolcache/macos-10.13/* $PACKAGES_DIR
if [ $? -ne 0 ]; then
echo "An error occured while downloading hostedtoolcache"
exit 1
fi
# Install the tools from the hosted tool cache
packages=$(find $PACKAGES_DIR -name package.json)
for package in $packages; do
pushd $(dirname $package)
npm install
popd
done;