File: upload-archive.sh

package info (click to toggle)
mitmproxy 8.1.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 38,952 kB
  • sloc: python: 53,389; javascript: 1,603; xml: 186; sh: 105; ansic: 68; makefile: 13
file content (22 lines) | stat: -rwxr-xr-x 509 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace

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"
aws --profile mitmproxy \
    cloudfront create-invalidation --distribution-id E1TH3USJHFQZ5Q \
    --paths "$SPATH/*"