Skip to content

Instantly share code, notes, and snippets.

@AidHamza
Forked from apremalal/build.sh
Created December 28, 2018 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AidHamza/f67c6b8fbcf56053a1f340ed3616f557 to your computer and use it in GitHub Desktop.
Save AidHamza/f67c6b8fbcf56053a1f340ed3616f557 to your computer and use it in GitHub Desktop.
Exclude vendor directory from goimports, go fmt,go install, go test ...
echo 'Formatting the code base...'
godep go fmt $(go list ./... | grep -v /vendor/)
echo 'Optimizing the imports...'
goimports -w $(go list -f {{.Dir}} ./... | grep -v /vendor/)
echo 'Installing dependencies. This might take some time...'
godep go install $(go list ./... | grep -v /vendor/)
echo "Executing test"
godep go test -v $(go list ./... | grep -v /vendor/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment