[macOS] Fix Bazel issue (#2543)

* Install Bazel 3.7.1 on the macOS images less than Catalina

* Export the USE_BAZEL_VERSION variable to the bashrc

Co-authored-by: MaksimZhukov <v-mazhuk@microsoft.com>
This commit is contained in:
MaksimZhukov
2021-01-26 10:44:38 +03:00
committed by GitHub
parent 0d1d77da0e
commit ed5d4dc5c5

View File

@@ -13,7 +13,13 @@ for package in $cask_packages; do
brew install --cask $package
done
# Invoke bazel to download the latest bazel version via bazelisk
# Specify Bazel version 3.7.1 to install due to the bug with 4.0.0: https://github.com/bazelbuild/bazel/pull/12882
if is_Less_Catalina; then
export USE_BAZEL_VERSION="3.7.1"
echo "export USE_BAZEL_VERSION=${USE_BAZEL_VERSION}" >> "${HOME}/.bashrc"
fi
# Invoke bazel to download bazel version via bazelisk
bazel
# Invoke tests for all common tools