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.
This commit is contained in:
Tim Hockin 2016-10-26 16:10:30 +02:00
parent ffeb01fd17
commit 7aa91bbff6

View File

@ -383,7 +383,7 @@ kube::golang::place_bins() {
if [[ -d "${full_binpath_src}" ]]; then if [[ -d "${full_binpath_src}" ]]; then
mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}" mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}"
find "${full_binpath_src}" -maxdepth 1 -type f -exec \ find "${full_binpath_src}" -maxdepth 1 -type f -exec \
rsync -pt {} "${KUBE_OUTPUT_BINPATH}/${platform}" \; rsync -ptc {} "${KUBE_OUTPUT_BINPATH}/${platform}" \;
fi fi
done done
} }