blob: 7f9b72799d9e9831379bdf380e2d02bd40f3a19b [file] [log] [blame]
#!/bin/bash
# exit on errors
set -eu -o pipefail
if [ ${GERRIT_BRANCH} == "onos-1.14" ]
then
BAZEL_VERSION="0.19.2"
else
if [ ${GERRIT_BRANCH} == "master" ]; then
BAZEL_VERSION="0.27.0"
else
BAZEL_VERSION="0.24.1"
fi
fi
if [ ${BAZEL_VERSION} != "none" ]
then
echo Installing bazel version ${BAZEL_VERSION}
curl -L -o bazel.sh -s https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
chmod +x bazel.sh
./bazel.sh --user
else
echo Not installing bazel
fi