1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-25 21:52:21 +00:00
2018-07-08 17:52:33 +08:00

21 lines
409 B
Bash
Executable File

#!/bin/sh -eu
bazel_version=$1
if test -z "${bazel_version}"; then
echo "Usage: .travis/install-bazel.sh bazel-version"
exit 1
fi
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
else
OS=linux
fi
filename=bazel-${bazel_version}-installer-${OS}-x86_64.sh
wget https://github.com/bazelbuild/bazel/releases/download/${bazel_version}/${filename}
chmod +x $filename
./$filename --user
rm -f $filename