Check for old golang versions while installing dependencies.
This commit is contained in:
@@ -32,6 +32,12 @@ if [ $travis -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
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
|
go get ./... # get all the go dependencies
|
||||||
[ -e "$GOBIN/mgmt" ] && rm -f "$GOBIN/mgmt" # the `go get` version has no -X
|
[ -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
|
# vet is built-in in go 1.6 - we check for go vet command
|
||||||
|
|||||||
Reference in New Issue
Block a user