aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2016-10-12 11:20:42 +0000
committerGravatar Yue Gan <yueg@google.com>2016-10-12 12:12:09 +0000
commitd38ee63c6402819b9c01637e7176e03ad2296314 (patch)
treeaea8f8422a4c42db34e488185c44e28c8da1006e /scripts
parent7bbb395a857bc07fc3ad2ac232bc0ad61475e1b8 (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-xscripts/ci/build.sh5
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}"
}