2018-03-20 22:41:24 +00:00
|
|
|
#!/bin/bash
|
2018-03-20 14:04:31 +00:00
|
|
|
set -e
|
2018-03-04 21:51:46 +00:00
|
|
|
|
|
|
|
if [[ $# -eq 0 ]] ; then
|
|
|
|
echo "Please supply a version, e.g. 'v3'"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# This script uploads docs to a specified archive version.
|
|
|
|
|
|
|
|
SPATH="/archive/$1"
|
|
|
|
|
|
|
|
aws configure set preview.cloudfront true
|
|
|
|
aws --profile mitmproxy \
|
|
|
|
s3 sync --acl public-read ./public s3://docs.mitmproxy.org$SPATH
|
2018-03-07 09:45:08 +00:00
|
|
|
aws --profile mitmproxy \
|
|
|
|
cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \
|
2018-03-21 12:46:41 +00:00
|
|
|
--paths "$SPATH/*"
|