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