mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
project: use vndr for vendoring
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user