check-dirty.sh 224 B

1234567891011
  1. #!/usr/bin/env bash
  2. set -e
  3. DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
  4. cd $DIR
  5. if [ ! -z "$(git status --porcelain)" ]; then
  6. echo "Dirty working tree after build:"
  7. git status --porcelain
  8. exit 1
  9. fi