blob: 6f69bc2a17b3a3d10c499d6db4d7883350deb25b [file] [log] [blame]
Ray Milkeyd83ef8e2018-11-09 11:57:01 -08001#!/bin/bash
2
3# exit on errors
4set -eu -o pipefail
5
6BAZEL_VERSION="none"
7
8if [ ${GERRIT_BRANCH} == "onos-1.14" ]
9then
10 BAZEL_VERSION="0.15.2"
11fi
12if [ ${GERRIT_BRANCH} == "onos-1.15" -o ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "upan-connect18" ]
13then
14 BAZEL_VERSION="0.19.0"
15fi
16
17if [ ${BAZEL_VERSION} != "none" ]
18then
19 echo Installing bazel version ${BAZEL_VERSION}
20 curl -L -o bazel.sh -s https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
21else
22 echo Not installing bazel
23fi
24
Ray Milkey4cf12d62018-11-09 13:10:50 -080025chmod +x bazel.sh
26./bazel.sh --user
27