OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-kit / kit / coveralls.bash
1 #!/usr/bin/env bash
2
3 if ! type -P gover
4 then
5         echo gover missing: go get github.com/modocache/gover
6         exit 1
7 fi
8
9 if ! type -P goveralls
10 then
11         echo goveralls missing: go get github.com/mattn/goveralls
12         exit 1
13 fi
14
15 if [[ "$COVERALLS_TOKEN" == "" ]]
16 then
17         echo COVERALLS_TOKEN not set
18         exit 1
19 fi
20
21 go list ./... | grep -v '/examples/' | cut -d'/' -f 4- | while read d
22 do
23         cd $d
24         go test -covermode count -coverprofile coverage.coverprofile
25         cd -
26 done
27
28 gover
29 goveralls -coverprofile gover.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
30 find . -name '*.coverprofile' -delete
31