containerd/script/validate/vendor
Daniel Nephin 2125d8efc3 Fix vendor validation
vendor/ must be removed first, otherwise files added to vendor/ that aren't added to
vendor.conf will not cause the validation to fail.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-02-02 10:54:21 -08:00

20 lines
305 B
Bash
Executable File

#!/usr/bin/env bash
set -eu -o pipefail
rm -rf vendor/
vndr |& grep -v -i clone
DIFF_PATH="vendor/"
DIFF=$(git status --porcelain -- "$DIFF_PATH")
if [ "$DIFF" ]; then
echo
echo "These files were modified:"
echo
echo "$DIFF"
echo
exit 1
else
echo "$DIFF_PATH is correct"
fi