From e8a67bcd4f0ca25353f820060ae674261931d0e4 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Thu, 23 Feb 2017 18:13:15 +0100 Subject: [PATCH] hack/verify-staging-client-go.sh: use git-archive to survive dirty checkouts --- hack/verify-staging-client-go.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/verify-staging-client-go.sh b/hack/verify-staging-client-go.sh index f4915e730b3..87b3203d0bd 100755 --- a/hack/verify-staging-client-go.sh +++ b/hack/verify-staging-client-go.sh @@ -57,8 +57,9 @@ fi for PACKAGE in apimachinery client-go; do PACKAGE_PATH="${TEMP_STAGING_GOPATH}/src/k8s.io/${PACKAGE}" echo "Creating a temporary ${PACKAGE} repo with a snapshot of HEAD" + rm -rf "${PACKAGE_PATH}" mkdir -p "${PACKAGE_PATH}" - rsync -ax --delete staging/src/k8s.io/${PACKAGE}/ "${PACKAGE_PATH}/" + git archive --format=tar "HEAD:staging/src/k8s.io/${PACKAGE}" | tar -xf - -C "${PACKAGE_PATH}" pushd "${PACKAGE_PATH}" >/dev/null git init >/dev/null git add *