From 1839a3ca64d6e26bbc6b7366c15da1312517a68e Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 17 Apr 2023 17:45:21 -0700 Subject: [PATCH] hack/ci/check_mods: simplify Signed-off-by: Kir Kolyshkin --- hack/ci/check_mods.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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}