From a68c7ffb27278c4e2aea4d2d8a87ee15a86bcd88 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 5 Mar 2018 10:51:46 +1300 Subject: [PATCH] docs: add build and upload scripts The upload scripts might be unified down the track, or might not. CloudFront is not set up for the docs bucket yet, so CDN invalidation is commented out. This will be added later. --- docs/build | 3 +++ docs/upload-archive | 17 +++++++++++++++++ docs/upload-master | 8 ++++++++ docs/upload-stable | 8 ++++++++ 4 files changed, 36 insertions(+) create mode 100755 docs/build create mode 100755 docs/upload-archive create mode 100755 docs/upload-master create mode 100755 docs/upload-stable diff --git a/docs/build b/docs/build new file mode 100755 index 000000000..1ca3fdb85 --- /dev/null +++ b/docs/build @@ -0,0 +1,3 @@ +#!/bin/sh + +cd src; hugo \ No newline at end of file diff --git a/docs/upload-archive b/docs/upload-archive new file mode 100755 index 000000000..5622a2aea --- /dev/null +++ b/docs/upload-archive @@ -0,0 +1,17 @@ +#!/bin/sh + +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 E3UCZ4MLN4TO7U \ +# --paths "$SPATH" diff --git a/docs/upload-master b/docs/upload-master new file mode 100755 index 000000000..c8fcda807 --- /dev/null +++ b/docs/upload-master @@ -0,0 +1,8 @@ +#!/bin/sh + +aws configure set preview.cloudfront true +aws --profile mitmproxy \ + s3 sync --acl public-read ./public s3://docs.mitmproxy.org/master +# aws --profile mitmproxy \ +# cloudfront create-invalidation --distribution-id E3UCZ4MLN4TO7U \ +# --paths "/master" diff --git a/docs/upload-stable b/docs/upload-stable new file mode 100755 index 000000000..7c658113f --- /dev/null +++ b/docs/upload-stable @@ -0,0 +1,8 @@ +#!/bin/sh + +aws configure set preview.cloudfront true +aws --profile mitmproxy \ + s3 sync --acl public-read ./public s3://docs.mitmproxy.org/stable +# aws --profile mitmproxy \ +# cloudfront create-invalidation --distribution-id E3UCZ4MLN4TO7U \ +# --paths "/master"