migrate to go modules from vndr

Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
This commit is contained in:
Tariq Ibrahim 2019-06-05 15:40:29 -07:00
parent dcfe05ce6c
commit 5223c27422
No known key found for this signature in database
GPG key ID: DFC94E4A008B908A
503 changed files with 273730 additions and 9491 deletions

View file

@ -2,19 +2,11 @@
set -eu -o pipefail
rm -rf vendor/
vndr |& grep -v -i clone
echo "- Checking for any unused/missing packages in go.mod..."
GO111MODULE=on go mod tidy
echo "- Checking for unused packages in vendor..."
GO111MODULE=on go mod vendor
git diff --exit-code -- go.sum go.mod vendor/
DIFF_PATH="vendor/"
DIFF=$(git status --porcelain -- "$DIFF_PATH")
if [ "$DIFF" ]; then
echo
echo "These files were modified:"
echo
echo "$DIFF"
echo
exit 1
else
echo "$DIFF_PATH is correct"
fi
untracked=$(git ls-files --others vendor | wc -l | awk '{ print $1 }')
[[ "${untracked}" == "0" ]]