From 7aa91bbff64a13222442ec7f5915bfe53acbbd50 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Wed, 26 Oct 2016 16:10:30 +0200 Subject: [PATCH] Use checksum to rsync results If dependencies are touched, the Makefile will detect that tools like deepcopy-gen need to be rebuilt. It will rebuild them, but Go decides the dependencies are not actually updated (maybe it was a test file - known limitation of the current Makefile) and does not touch the resulting binary. Then the Makefile touches the result explicitly to mark thatthe dep change has been handled. Then rsync blows away that change with the older file, and helpfully preserves the timestamp. Now rsync ignores it if the checksum is the same. Result = faster build. --- hack/lib/golang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index fd2cfe7d406..7a73b64691b 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -383,7 +383,7 @@ kube::golang::place_bins() { if [[ -d "${full_binpath_src}" ]]; then mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}" find "${full_binpath_src}" -maxdepth 1 -type f -exec \ - rsync -pt {} "${KUBE_OUTPUT_BINPATH}/${platform}" \; + rsync -ptc {} "${KUBE_OUTPUT_BINPATH}/${platform}" \; fi done }