From accb8cdda59e362833b955766fc1135e30fcfa20 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Thu, 25 Jan 2018 19:02:06 -0800 Subject: [PATCH] Only run verify-staging-godeps if staging/godeps are touched --- hack/verify-staging-godeps.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hack/verify-staging-godeps.sh b/hack/verify-staging-godeps.sh index e3d463f9c43..ffc764917fb 100755 --- a/hack/verify-staging-godeps.sh +++ b/hack/verify-staging-godeps.sh @@ -19,4 +19,15 @@ set -o nounset set -o pipefail KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +source "${KUBE_ROOT}/hack/lib/init.sh" + +readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}} +if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \ + ! kube::util::has_changes_against_upstream_branch "${branch}" 'staging/' && \ + ! kube::util::has_changes_against_upstream_branch "${branch}" 'Godeps/' && \ + ! kube::util::has_changes_against_upstream_branch "${branch}" 'vendor/' && \ + ! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/.*godep'; then + exit 0 +fi + KUBE_VERBOSE="${KUBE_VERBOSE:-3}" KUBE_RUN_COPY_OUTPUT=N ${KUBE_ROOT}/hack/update-staging-godeps.sh -d -f "$@"