diff --git a/hack/ci/check_mods.sh b/hack/ci/check_mods.sh index 390e3bc..fd31148 100755 --- a/hack/ci/check_mods.sh +++ b/hack/ci/check_mods.sh @@ -2,14 +2,8 @@ set -e -exit_code=0 - make vendor -git diff --exit-code go.mod go.sum || exit_code=$? - -if [ ${exit_code} -eq 0 ]; then - exit 0 +if ! git diff --exit-code go.mod go.sum; then + echo "please run \`make mod\` and check in the changes" + exit 1 fi - -echo "please run \`make mod\` and check in the changes" -exit ${exit_code}