Do not try to install the jdk7 flavor of Bazel in gce/bootstrap-bazel.sh
It no longer exists.
# See the License for the specific language governing permissions and
# limitations under the License.
+set -eu
# Install a bootstrap bazel; we use the latest released version
PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)
@@ -22,14 +23,8 @@ CI_HOME="$(echo ~ci)"
mkdir -p "${CI_HOME}/bootstrap-bazel"
cd "${CI_HOME}/bootstrap-bazel"
-for flavour in '' '-jdk7'
-do
- jdk=
- if [ "$flavour" = "" ]; then
- jdk="-without-jdk"
- fi
- installer="https://releases.bazel.build/${BAZEL_VERSION}/release/bazel-${BAZEL_VERSION}${flavour}${jdk}-installer-${PLATFORM}.sh"
- destination="${CI_HOME}/.bazel/${BAZEL_VERSION}${flavour}"
+installer="https://releases.bazel.build/${BAZEL_VERSION}/release/bazel-${BAZEL_VERSION}-without-jdk-installer-${PLATFORM}.sh"
+destination="${CI_HOME}/.bazel/${BAZEL_VERSION}"
curl -L -o install.sh "${installer}"
chmod 0755 ./install.sh
rm -fr "${destination}"
@@ -37,8 +32,7 @@ do
./install.sh \
--base="${destination}" \
--bin="${destination}/binary"
- ln -s "${destination}" "${CI_HOME}/.bazel/latest${flavour}"
-done
+ln -s "${destination}" "${CI_HOME}/.bazel/latest"
chown -R ci "${CI_HOME}/.bazel"
rm -rf "${CI_HOME}/bootstrap-bazel"
