From 692086f898522ecde96742391140bca1212bf4fe Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 3 Apr 2019 16:04:24 -0400 Subject: [PATCH] ci: add missing cache control headers and update download/index.json --- ci/azure/linux_script | 2 +- ci/azure/macos_script | 2 +- ci/azure/update_download_page | 1 + ci/azure/windows_upload | 2 +- ci/srht/freebsd_script | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/azure/linux_script b/ci/azure/linux_script index effcbd2992..b3eb6be98b 100755 --- a/ci/azure/linux_script +++ b/ci/azure/linux_script @@ -41,7 +41,7 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE - s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" + s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/linux-$VERSION.json" # `set -x` causes these variables to be mangled. diff --git a/ci/azure/macos_script b/ci/azure/macos_script index 76f40ea9e6..60c270dbfb 100755 --- a/ci/azure/macos_script +++ b/ci/azure/macos_script @@ -98,7 +98,7 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE - s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" + s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/macos-$VERSION.json" # `set -x` causes these variables to be mangled. diff --git a/ci/azure/update_download_page b/ci/azure/update_download_page index 740b750fdc..c1e816a309 100755 --- a/ci/azure/update_download_page +++ b/ci/azure/update_download_page @@ -38,3 +38,4 @@ mv "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg" s3cmd put -P "../$SRC_TARBALL" s3://ziglang.org/builds/ s3cmd put -P "../$LANGREF" s3://ziglang.org/documentation/master/index.html --add-header="Cache-Control: max-age=0, must-revalidate" s3cmd put -P www/download/index.html s3://ziglang.org/download/index.html --add-header="Cache-Control: max-age=0, must-revalidate" +s3cmd put -P www/download/index.json s3://ziglang.org/download/index.json --add-header="Cache-Control: max-age=0, must-revalidate" diff --git a/ci/azure/windows_upload b/ci/azure/windows_upload index 4cf3328e59..629f68a12e 100755 --- a/ci/azure/windows_upload +++ b/ci/azure/windows_upload @@ -32,7 +32,7 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE - s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" + s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/windows-$VERSION.json" # `set -x` causes these variables to be mangled. diff --git a/ci/srht/freebsd_script b/ci/srht/freebsd_script index 284ea744ac..ef875b820a 100755 --- a/ci/srht/freebsd_script +++ b/ci/srht/freebsd_script @@ -49,6 +49,6 @@ if [ -f ~/.s3cfg ]; then echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE - s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" + s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/freebsd-$VERSION.json" fi