23 lines
659 B
Bash
Executable File
23 lines
659 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu -o pipefail -x
|
|
|
|
iidfile=$(mktemp -t docker-iidfile.XXXXXXXXXX)
|
|
docker build --build-arg VNDR_VERSION=48ac2669d9d1bcacd3163650ef911edca2ec3b42 --iidfile $iidfile -f ./hack/dockerfiles/vendor.Dockerfile --force-rm .
|
|
iid=$(cat $iidfile)
|
|
diffs="$(docker run $iid git status --porcelain -- vendor 2>/dev/null)"
|
|
if [ "$diffs" ]; then
|
|
{
|
|
set +x
|
|
echo 'The result of vndr differs'
|
|
echo
|
|
echo "$diffs"
|
|
echo
|
|
echo 'Please vendor your package with github.com/LK4D4/vndr.'
|
|
echo
|
|
} >&2
|
|
false
|
|
fi
|
|
echo 'Congratulations! All vendoring changes are done the right way.'
|
|
rm -f $iidfile
|