blob: 4b57afaff65854b3dcac83bc068d58f110f11f60 [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" -o ${GERRIT_BRANCH} == "onos-2.2" -o ${GERRIT_BRANCH} == "onos-2.3" -o ${GERRIT_BRANCH} == "onos-1.15" ]; then
BAZEL_VERSION="1.0.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