| #!/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" ]; 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 |
| |
| |