Files
virtual-kubelet/scripts/validate/gomod.sh
Sargun Dhillon 1c581260d5 Add envtest
I know it's not an impressive test. It just brings up a node, and
makes sure it registers. Let's do more in the future.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
2020-11-06 20:37:35 -08:00

21 lines
391 B
Bash
Executable File

#!/usr/bin/env bash
set -e
exit_code=0
echo "==> Running go mod tidy to add missing and remove unused modules <=="
GO111MODULE=on go mod tidy || exit_code=1
if [ $exit_code -ne 0 ]; then
echo 'Checking go.mod and go.sum files'
else
echo "go mod tidy passed."
fi
if [ ${exit_code} -eq 0 ]; then
exit 0
fi
echo "please run \`go mod tidy\` and check in the changes"
exit ${exit_code}