# remove the current Godeps.json so we always rebuild it
echo"Rewriting Godeps.json to remove commits that don't really exist because we haven't pushed the prereqs yet"
rm-rf${TARGET_DIR}/src/${repo}/Godeps
go run "${KUBE_ROOT}/staging/godeps-json-updater.go"--godeps-file="${TMP_GOPATH}/src/k8s.io/${repo}/Godeps/Godeps.json"--client-go-import-path="k8s.io/${repo}"
GOPATH="${godepRestoreDir}:${TARGET_DIR}"
pushd${TARGET_DIR}/src/${repo}
# commit so that following repos do not see this repo as dirty
${godep} save ./...
git add vendor >/dev/null
git commit -a-m"Updated Godeps.json">/dev/null
# now remove all the go files. We'll re-run a restore, go get, godep save cycle in the sync scripts
popd>/dev/null
# to get the commits for other staging k8s.io repos anyway, so we don't need the added files
rm-rf vendor
echo"rewriting Godeps.json to remove commits that don't really exist because we haven't pushed the prereqs yet"
GOPATH="${ORIGINAL_GOPATH}"
go run "${KUBE_ROOT}/staging/godeps-json-updater.go"--godeps-file="${TARGET_DIR}/src/${repo}/Godeps/Godeps.json"--client-go-import-path="${repo}"
popd
echo"finished ${repo} save"
}
}
# move into staging and save the dependencies for everything in order
# move into staging and save the dependencies for everything in order
for stagingRepo in$(ls${KUBE_ROOT}/staging/src/k8s.io);do
mkdir-p"${TMP_GOPATH}/src/k8s.io"
for repo in$(ls${KUBE_ROOT}/staging/src/k8s.io);do
# we have to skip client-go because it does unusual manipulation of its godeps
# we have to skip client-go because it does unusual manipulation of its godeps
go run "${DIR}/godeps-json-updater.go"--godeps-file="${CLIENT_REPO_TEMP}/Godeps/Godeps.json"--client-go-import-path="${CLIENT_REPO_FROM_SRC}"
go run "${KUBE_ROOT}/staging/godeps-json-updater.go"--godeps-file="${CLIENT_REPO_TEMP}/Godeps/Godeps.json"--client-go-import-path="${CLIENT_REPO_FROM_SRC}"