From a7452e5e77a5e0011ae3ee7ba3c9ad014d46a767 Mon Sep 17 00:00:00 2001 From: ialidzhikov Date: Fri, 24 Nov 2023 14:32:33 +0200 Subject: [PATCH] Adapt to the breaking change in the `hack/check-skaffold-deps-for-binary.sh` script See https://github.com/gardener/gardener/pull/8766 --- hack/check-skaffold-deps.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hack/check-skaffold-deps.sh b/hack/check-skaffold-deps.sh index 9d4c9183..d93271e3 100755 --- a/hack/check-skaffold-deps.sh +++ b/hack/check-skaffold-deps.sh @@ -16,20 +16,22 @@ set -e -echo "> Check Skaffold Dependencies" +operation="${1:-check}" -check_successful=true +echo "> ${operation^} Skaffold Dependencies" + +success=true repo_root="$(git rev-parse --show-toplevel)" -function check() { - if ! $repo_root/vendor/github.com/gardener/gardener/hack/check-skaffold-deps-for-binary.sh --skaffold-file $1 --binary $2 --skaffold-config $3; then - check_successful=false +function run() { + if ! "$repo_root"/vendor/github.com/gardener/gardener/hack/check-skaffold-deps-for-binary.sh "$operation" --skaffold-file "$1" --binary "$2" --skaffold-config "$3"; then + success=false fi } -check "skaffold.yaml" "gardener-extension-registry-cache" "extension" -check "skaffold.yaml" "gardener-extension-registry-cache-admission" "admission" +run "skaffold.yaml" "gardener-extension-registry-cache" "extension" +run "skaffold.yaml" "gardener-extension-registry-cache-admission" "admission" -if [ "$check_successful" = false ] ; then +if ! $success ; then exit 1 fi