diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2016-10-12 11:20:42 +0000 |
---|---|---|
committer | Yue Gan <yueg@google.com> | 2016-10-12 12:12:09 +0000 |
commit | d38ee63c6402819b9c01637e7176e03ad2296314 (patch) | |
tree | aea8f8422a4c42db34e488185c44e28c8da1006e /scripts | |
parent | 7bbb395a857bc07fc3ad2ac232bc0ad61475e1b8 (diff) |
Site publishing: add checksum computation to `gsutil rsync`
`gsutil rsync` does not compute checksum when one of its
argument is on a local filesystem because this can be slow,
for our use case we want to do it or two files with the same
size will be seen as identical.
--
MOS_MIGRATED_REVID=135903003
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/build.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index fb2a092f17..4f0e05f725 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -492,7 +492,10 @@ function build_and_publish_site() { fi tar xf "${site}" --exclude=CNAME -C "${tmpdir}" jekyll build -s "${tmpdir}" -d "${tmpdir}/production" - "${gs}" rsync -r "${tmpdir}/production" "gs://${bucket}" + # Rsync: + # -r: recursive + # -c: compute checksum even though the input is from the filesystem + "${gs}" rsync -r -c "${tmpdir}/production" "gs://${bucket}" "${gs}" web set -m index.html -e 404.html "gs://${bucket}" "${gs}" -m acl ch -R -u AllUsers:R "gs://${bucket}" } |