#!/bin/bash | |
# exit on errors | |
set -eu -o pipefail | |
if [ ${GERRIT_BRANCH} == "master" ] | |
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 [ ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "onos-2.2" ] | |
then | |
echo Installing OPEN JDK 11 | |
sudo update-java-alternatives -s java-1.11.0-openjdk-amd64 | |
which java | |
else | |
echo Using default JDK | |
fi | |