Merge pull request #41986 from sttts/sttts-verify-staging-client-go-dirty-tree

Automatic merge from submit-queue

hack/verify-staging-client-go.sh: use git-archive to survive dirty working tree

We used rsync before and copied over the checkout. If some other script, created or changed files, godep refused to run.

Now the script uses git-archive against HEAD instead.
This commit is contained in:
Kubernetes Submit Queue 2017-02-23 12:06:21 -08:00 committed by GitHub
commit c8a87d3a62

View File

@ -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 *