Check for old golang versions while installing dependencies.

This commit is contained in:
Jeremy Thurgood
2016-07-07 10:14:56 +02:00
parent f1fa64c170
commit 5d45bcd552

View File

@@ -32,6 +32,12 @@ if [ $travis -eq 0 ]; then
fi
fi
# if golang is too old, we don't want to fail with an obscure error later
if go version | grep 'go1\.[0123]\.'; then
echo "mgmt requires go1.4 or higher."
exit 1
fi
go get ./... # get all the go dependencies
[ -e "$GOBIN/mgmt" ] && rm -f "$GOBIN/mgmt" # the `go get` version has no -X
# vet is built-in in go 1.6 - we check for go vet command