From 84cf8f92fa24f8b8c6114d303903d0600d4cfd37 Mon Sep 17 00:00:00 2001 From: liukun Date: Mon, 21 May 2018 14:33:41 +0800 Subject: [PATCH] update the go version (#463) --- scripts/check_requirement.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/check_requirement.sh b/scripts/check_requirement.sh index cae7df70de0ee..28cff378ca087 100755 --- a/scripts/check_requirement.sh +++ b/scripts/check_requirement.sh @@ -25,13 +25,13 @@ function install_go { echo "Intall go ..." case "$OSTYPE" in linux*) - curl -L https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz -o golang.tar.gz + curl -L https://storage.googleapis.com/golang/go1.10.2.linux-amd64.tar.gz -o golang.tar.gz ${SUDO} tar -C /usr/local -xzf golang.tar.gz rm golang.tar.gz ;; darwin*) - curl -L https://storage.googleapis.com/golang/go1.9.2.darwin-amd64.tar.gz -o golang.tar.gz + curl -L https://storage.googleapis.com/golang/go1.10.2.darwin-amd64.tar.gz -o golang.tar.gz ${SUDO} tar -C /usr/local -xzf golang.tar.gz rm golang.tar.gz ;; @@ -94,8 +94,8 @@ if which go &>/dev/null; then # requires go >= 1.8 GO_VER_1=`go version | awk 'match($0, /([0-9])+(\.[0-9])+/) { ver = substr($0, RSTART, RLENGTH); split(ver, n, "."); print n[1];}'` GO_VER_2=`go version | awk 'match($0, /([0-9])+(\.[0-9])+/) { ver = substr($0, RSTART, RLENGTH); split(ver, n, "."); print n[2];}'` - if [[ (($GO_VER_1 -eq 1 && $GO_VER_2 -lt 8)) || (($GO_VER_1 -lt 1)) ]]; then - echo "Please upgrade Go to 1.8 or later." + if [[ (($GO_VER_1 -eq 1 && $GO_VER_2 -lt 10)) || (($GO_VER_1 -lt 1)) ]]; then + echo "Please upgrade Go to 1.10 or later." exit 1 fi else @@ -115,4 +115,4 @@ else install_gpp fi -echo OK \ No newline at end of file +echo OK