check.sh 821 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. set -o errexit
  3. set -o nounset
  4. set -o pipefail
  5. export KRATOS_ROOT=$(dirname "${BASH_SOURCE}")/..
  6. source "${KRATOS_ROOT}/build/lib/init.sh"
  7. #kratos::util::ensure-gnu-sed
  8. if ! bazel version |grep $bazel_version >/dev/null ; then
  9. kratos::log::info "We suggest you to use bazel $bazel_version for building quickly.
  10. Mac: brew upgrade bazel
  11. Ubuntu: sudo apt-get upgrade bazel
  12. Centos/Redhat: sudo yum update bazel
  13. Fedore: sudo dnf update bazel
  14. For more information.Please read this document https://docs.bazel.build/versions/master/install.html
  15. " >&2
  16. fi
  17. if [ $(uname -s) = "Linux" ]; then
  18. kratos::util::ensure-bazel
  19. fi
  20. if [ $(uname -s) = "Darwin" ];
  21. then
  22. kratos::util::ensure-homebrew
  23. kratos::util::ensure-homebrew-bazel
  24. fi