This repository was archived by the owner on Aug 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ mkdocs build
88SITE_BUCKET=s3://docs.opendata.aws/genomics-workflows
99ASSET_BUCKET=s3://aws-genomics-workflows
1010ASSET_STAGE=test
11+ ASSET_PROFILE=asset-publisher
12+ DEPLOY_REGION=us-east-1
1113
1214PARAMS=" "
1315while (( "$# " )) ; do
@@ -20,6 +22,14 @@ while (( "$#" )); do
2022 ASSET_BUCKET=$2
2123 shift 2
2224 ;;
25+ --asset-profile)
26+ ASSET_PROFILE=$2
27+ shift 2
28+ ;;
29+ --deploy-region)
30+ DEPLOY_REGION=$2
31+ shift 2
32+ ;;
2333 --) # end optional argument parsing
2434 shift
2535 break
@@ -48,7 +58,7 @@ function s3_uri() {
4858 PREFIX_PARTS=(${PREFIX_PARTS[@]} )
4959 PREFIX=$( printf ' /%s' " ${PREFIX_PARTS[@]%/ } " )
5060
51- echo " ${BUCKET%/ } /${PREFIX: 1} "
61+ echo " s3:// ${BUCKET%/ } /${PREFIX: 1} "
5262}
5363
5464function s3_sync() {
@@ -59,8 +69,8 @@ function s3_sync() {
5969 echo " from: $source "
6070 echo " to: $destination "
6171 aws s3 sync \
62- --profile asset-publisher \
63- --region us-east-1 \
72+ --profile $ASSET_PROFILE \
73+ --region $DEPLOY_REGION \
6474 --acl public-read \
6575 --delete \
6676 --metadata commit=$( git rev-parse HEAD) \
@@ -141,7 +151,7 @@ function templates() {
141151function site() {
142152 echo " publishing site"
143153 aws s3 sync \
144- --region us-east-1 \
154+ --region $DEPLOY_REGION \
145155 --acl public-read \
146156 --delete \
147157 --metadata commit=$( git rev-parse HEAD) \
You can’t perform that action at this time.
0 commit comments