Skip to content

Commit

Permalink
Fixing build script to fail on bad gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Oct 6, 2016
1 parent 6b3c1e0 commit d56fc92
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/sh
#!/bin/bash

# Exit on first error.
set -e

go test ./...

gofmt -s -d .
# Make sure there is no output from gofmt.
gofmt -s -d . 2>&1 | read && (echo 'error: not formatted' || exit 1)

go vet ./...

0 comments on commit d56fc92

Please sign in to comment.