Fix coveralls.io data pushing

This commit is contained in:
Jakob Borg 2014-06-10 16:55:16 +02:00
parent 38ac4e8f79
commit 8716ed5aa4
3 changed files with 18 additions and 16 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@ stcli.exe
*.sublime* *.sublime*
discosrv discosrv
stpidx stpidx
.jshintrc .jshintrc
coverage.out

View File

@ -14,4 +14,8 @@ script:
- ./build.sh test-cov - ./build.sh test-cov
after_success: after_success:
- goveralls -coverprofile=acc.out -service=travis-ci - goveralls -coverprofile=coverage.out -service=travis-ci -package=calmh/syncthing -repotoken="$COVERALS_TOKEN"
env:
global:
secure: "zEV2h2XtKHNLVdXJjM4LA/VjMfLVydm6goF+ARit+nOSGxGoH7f7jIdzJzhxgh7shKG93q61eLO1Tug+WBMYB2EpBuYnTB5AIMYhCDwNI8C4uBV6c3brHfcrie7MASNao8TID2QScASKNFFWvjv/i1Ccn5ztxdcQuhSsNjGZp8A="

View File

@ -32,20 +32,16 @@ assets() {
} }
test-cov() { test-cov() {
echo "mode: set" > acc.out echo "mode: set" > coverage.out
fail=0 fail=0
for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/integration' -not -path '*/_*' -type d); for dir in $(go list ./...) ; do
do godep go test -coverprofile=profile.out $dir || fail=1
if ls $dir/*.go &> /dev/null; then if [ -f profile.out ] ; then
godep go test -coverprofile=profile.out $dir || fail=1 grep -v "mode: set" profile.out >> coverage.out
if [ -f profile.out ] rm profile.out
then fi
cat profile.out | grep -v "mode: set" >> acc.out done
rm profile.out
fi
fi
done
exit $fail exit $fail
} }
@ -80,7 +76,8 @@ zipDist() {
rm -rf "$name" rm -rf "$name"
mkdir -p "$name" mkdir -p "$name"
for f in "${distFiles[@]}" ; do for f in "${distFiles[@]}" ; do
sed 's/$/ /' < "$f" > "$name/$f.txt" sed 's/$/
/' < "$f" > "$name/$f.txt"
done done
cp syncthing.exe "$name" cp syncthing.exe "$name"
sign "$name/syncthing.exe" sign "$name/syncthing.exe"