Add a vendor check to CI

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin
2018-01-08 19:01:13 -05:00
parent b5204b77cd
commit 315084fa15
2 changed files with 19 additions and 0 deletions

18
script/validate/vendor Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -eu -o pipefail
vndr 2>&1 | 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