From ebbf0b1ad689a89cbd9a14de6905eb2b5bf37984 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 | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/hack/check-skaffold-deps.sh b/hack/check-skaffold-deps.sh index a7f80171..d93271e3 100755 --- a/hack/check-skaffold-deps.sh +++ b/hack/check-skaffold-deps.sh @@ -16,16 +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 ! $success ; then + exit 1 +fi