Skip to content

Commit

Permalink
build script: Added go fmt/go vet validation
Browse files Browse the repository at this point in the history
  • Loading branch information
tigrawap committed May 1, 2017
1 parent a9fafc9 commit 0065ce3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/usr/bin/env bash

set -e
if [ $(go fmt | tee /dev/fd/2 | wc -l) != 0 ]; then
echo "Refusing to build, go fmt had something to say"
exit 1
fi
if [ $(go vet | tee /dev/fd/2 | wc -l) != 0 ]; then
echo "Refusing to build, go vet had something to say"
exit 1
fi
gox --osarch="darwin/386 darwin/amd64 linux/386 linux/amd64 windows/386 windows/amd64 freebsd/386" github.com/tigrawap/slit
echo "Build successful"

0 comments on commit 0065ce3

Please sign in to comment.