Skip to content

Commit

Permalink
fix verify-gofmt's version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
lavalamp committed Sep 24, 2014
1 parent 9564dac commit 50eb2cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions hack/verify-gofmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 50eb2cf

Please sign in to comment.