github.com/duglin/docker@v1.13.1/hack/validate/vendor (about) 1 #!/bin/bash 2 3 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 source "${SCRIPTDIR}/.validate" 5 6 IFS=$'\n' 7 files=( $(validate_diff --diff-filter=ACMR --name-only -- 'vendor.conf' 'vendor/' || true) ) 8 unset IFS 9 10 if [ ${#files[@]} -gt 0 ]; then 11 # We run vndr to and see if we have a diff afterwards 12 vndr 13 # Let see if the working directory is clean 14 diffs="$(git status --porcelain -- vendor 2>/dev/null)" 15 if [ "$diffs" ]; then 16 { 17 echo 'The result of vndr differs' 18 echo 19 echo "$diffs" 20 echo 21 echo 'Please vendor your package with github.com/LK4D4/vndr.' 22 echo 23 } >&2 24 false 25 else 26 echo 'Congratulations! All vendoring changes are done the right way.' 27 fi 28 else 29 echo 'No vendor changes in diff.' 30 fi