Permalink
Browse files

CI: support BSD xargs

  • Loading branch information...
1 parent 525532a commit cf2fbeb40317dbe1fcc6a04afa1865dd39788af6 @haya14busa committed Sep 2, 2016
Showing with 8 additions and 2 deletions.
  1. +1 −0 .travis.yml
  2. +7 −2 Makefile
View
@@ -12,6 +12,7 @@ before_install:
- make deps
script:
+ - uname
- make lint
- go test -v -race ./...
- goveralls -service=travis-ci
View
@@ -10,10 +10,15 @@ deps:
go get github.com/kisielk/errcheck
go get github.com/client9/misspell/cmd/misspell
+# http://syohex.hatenablog.com/entry/20140702/1404250291
+XARG_EMPTY=''
+ifeq ("$(uname)", "LINUX")
+ XARG_EMPTY='-r'
+endif
lint: deps
- gofmt -d -s . | tee /dev/stderr | xargs -r false
- golint ./... | tee /dev/stderr | xargs -r false
+ gofmt -d -s . | tee /dev/stderr | xargs $(XARG_EMPTY) false
+ golint ./... | tee /dev/stderr | xargs $(XARG_EMPTY) false
go vet ./...
errcheck -asserts -ignoretests -ignore 'Close'
misspell -error **/*.go **/*.md

0 comments on commit cf2fbeb

Please sign in to comment.