Skip to content

Commit

Permalink
Added script to check for dirty workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush Sobti committed Mar 14, 2018
1 parent 668128c commit 087e319
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
language: go

script:
- make
- .travis/check_workspace.sh
11 changes: 11 additions & 0 deletions .travis/check_workspace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
set -e

if [ "$(git status --porcelain | wc -l)" -ne "0" ]; then
echo "Dirty workspace detected. This typically indicates 'go fmt' changed some files?" \
"\n Run 'make' locally to verify."
exit 1
else
exit 0
fi

0 comments on commit 087e319

Please sign in to comment.