fix verify-gofmt's version detection

pull/6/head
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

@ -5,7 +5,7 @@ go:
- 1.3
- 1.2
install:
install:
- go get code.google.com/p/go.tools/cmd/cover
- ./hack/install-etcd.sh
- ./hack/verify-gofmt.sh

View File

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