fix verify-gofmt's version detection

This commit is contained in:
Daniel Smith 2014-09-24 14:25:21 -07:00
parent 9564dacf6c
commit 50eb2cf59c
2 changed files with 3 additions and 4 deletions

View File

@ -17,10 +17,9 @@
# GoFmt apparently is changing @ head... # GoFmt apparently is changing @ head...
GO_VERSION=($(go version)) GO_VERSION=($(go version))
echo "Detected go version: $(go version)"
if [[ ${GO_VERSION[2]} != "go1.2" && ${GO_VERSION[2]} != "go1.3" ]]; then if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3') ]]; then
echo "Unknown go version, skipping gofmt." echo "Unknown go version '${GO_VERSION}', skipping gofmt."
exit 0 exit 0
fi fi