Add a vendor check to CI
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
parent
b5204b77cd
commit
315084fa15
@ -53,6 +53,7 @@ script:
|
|||||||
- export CGO_ENABLED=$TRAVIS_CGO_ENABLED
|
- export CGO_ENABLED=$TRAVIS_CGO_ENABLED
|
||||||
- DCO_VERBOSITY=-q script/validate/dco
|
- DCO_VERBOSITY=-q script/validate/dco
|
||||||
- GOOS=linux script/setup/install-dev-tools
|
- GOOS=linux script/setup/install-dev-tools
|
||||||
|
- script/validate/vendor
|
||||||
- go build -i .
|
- go build -i .
|
||||||
- make check
|
- make check
|
||||||
- if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi
|
- if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi
|
||||||
|
18
script/validate/vendor
Executable file
18
script/validate/vendor
Executable 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
|
Loading…
Reference in New Issue
Block a user