Skip to content

Commit

Permalink
update the go version (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
liukun4515 authored and lilin90 committed May 21, 2018
1 parent 12409f1 commit 84cf8f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/check_requirement.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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
Expand All @@ -115,4 +115,4 @@ else
install_gpp
fi

echo OK
echo OK

0 comments on commit 84cf8f9

Please sign in to comment.