project: use vndr for vendoring

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov
2016-10-31 11:22:28 -07:00
parent f54339dfea
commit f2614f2107
2107 changed files with 99972 additions and 26271 deletions

View File

@@ -4,21 +4,21 @@ export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "${SCRIPTDIR}/.validate"
IFS=$'\n'
files=( $(validate_diff --diff-filter=ACMR --name-only -- 'hack/vendor.sh' 'hack/.vendor-helpers.sh' 'vendor/' || true) )
files=( $(validate_diff --diff-filter=ACMR --name-only -- 'vendor.conf' 'vendor/' || true) )
unset IFS
if [ ${#files[@]} -gt 0 ]; then
# We run vendor.sh to and see if we have a diff afterwards
./hack/vendor.sh >/dev/null
# We run vndr to and see if we have a diff afterwards
vndr
# Let see if the working directory is clean
diffs="$(git status --porcelain -- vendor 2>/dev/null)"
if [ "$diffs" ]; then
{
echo 'The result of ./hack/vendor.sh differs'
echo 'The result of vndr differs'
echo
echo "$diffs"
echo
echo 'Please vendor your package with ./hack/vendor.sh.'
echo 'Please vendor your package with github.com/LK4D4/vndr.'
echo
} >&2
false