Skip to content

Instantly share code, notes, and snippets.

@redaphid
Last active July 15, 2019 03:17
Show Gist options
  • Save redaphid/d0bdf1b53e82f2cb27506b47ad5e86e2 to your computer and use it in GitHub Desktop.
Save redaphid/d0bdf1b53e82f2cb27506b47ad5e86e2 to your computer and use it in GitHub Desktop.
Much faster ginkgo watch. Because I'm procrastinating doing actual work.
#!/bin/bash
PROJECT_PATH=`pwd`
CODE_PATH=`pwd`
chsum1=""
while [[ true ]]
do
chsum2=`find $CODE_PATH -maxdepth 4 -type f -name "*.go" -exec ls -al {} \; | md5`
if [[ $chsum1 != $chsum2 ]] ; then
ginkgo test ./...
chsum1=$chsum2
fi
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment