Skip to content

Instantly share code, notes, and snippets.

@RomanMinkin
Forked from apremalal/build.sh
Created June 9, 2018 03:29
Show Gist options
  • Save RomanMinkin/cdaba05b74cd14a18e39077d6de2924e to your computer and use it in GitHub Desktop.
Save RomanMinkin/cdaba05b74cd14a18e39077d6de2924e 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