From accb8cdda59e362833b955766fc1135e30fcfa20 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Thu, 25 Jan 2018 19:02:06 -0800 Subject: [PATCH 1/2] 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 "$@" From 0088f3d67f6d434ba6700e0474325cfd5c01d8f4 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Fri, 26 Jan 2018 13:29:35 -0800 Subject: [PATCH 2/2] Add in godeps verification for hack/lib/ and build/ --- hack/verify-godeps.sh | 1 + hack/verify-staging-godeps.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hack/verify-godeps.sh b/hack/verify-godeps.sh index 91731ec8aaa..74a2c761e5e 100755 --- a/hack/verify-godeps.sh +++ b/hack/verify-godeps.sh @@ -49,6 +49,7 @@ readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}} if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \ ! 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/lib/' && \ ! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/.*godep'; then exit 0 fi diff --git a/hack/verify-staging-godeps.sh b/hack/verify-staging-godeps.sh index ffc764917fb..7177ac639e9 100755 --- a/hack/verify-staging-godeps.sh +++ b/hack/verify-staging-godeps.sh @@ -24,8 +24,10 @@ 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}" 'build/' && \ ! 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/lib/' && \ ! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/.*godep'; then exit 0 fi