blob: 30a6972dc340d7c1498c372604ec67ac67a54d46 [file] [log] [blame]
#!/bin/bash
# exit on errors
set -eu -o pipefail
BAZEL_VERSION="none"
if [ ${GERRIT_BRANCH} == "onos-1.14" -o ${GERRIT_BRANCH} == "upan-connect18-1.14" ]
then
BAZEL_VERSION="0.15.2"
fi
if [ ${GERRIT_BRANCH} == "onos-1.15" -o ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "upan-connect18" ]
then
BAZEL_VERSION="0.19.0"
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
else
echo Not installing bazel
fi
chmod +x bazel.sh
./bazel.sh --user