git-lfs/script/lint

17 lines
496 B
Plaintext
Raw Normal View History

2015-07-30 02:37:31 +00:00
#!/usr/bin/env bash
deps=$(go list -f '{{join .Deps "\n"}}' . | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | grep -v "github.com/github/git-lfs")
# exit 0 means non-vendored deps were found
if [ $? -eq 0 ];
then
echo "Non vendored dependencies found:"
for d in $deps; do echo "\t$d"; done
2015-07-21 17:14:15 +00:00
echo
echo "These dependencies should be tracked in 'Nut.toml', with an import prefix of:"
echo "\tgithub.com/github/git-lfs/vendor/_nuts"
exit 1
else
echo "Looks good!"
fi