Update deploy to use new S3 setup
This commit is contained in:
+24
-1
@@ -1,3 +1,26 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
aws s3 sync html/ s3://crafting-guide.com/
|
export AWS_CONFIG_FILE="$HOME/Documents/CraftingGuide/aws.config"
|
||||||
|
|
||||||
|
ROOT="./dist"
|
||||||
|
SITE="crafting-guide.com"
|
||||||
|
TARGET=""
|
||||||
|
while [[ "$1" != "" ]]; do
|
||||||
|
case "$1" in
|
||||||
|
"--new") TARGET="new";;
|
||||||
|
"--promote") TARGET="promote";;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "$TARGET" == "" ]]; then
|
||||||
|
echo "Please choose either --new or --promote for the target."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$TARGET" == "new" ]]; then
|
||||||
|
find $ROOT -name ".DS_Store" | xargs rm
|
||||||
|
aws s3 sync $ROOT s3://new.$SITE --delete
|
||||||
|
elif [[ "$TARGET" == "promote" ]]; then
|
||||||
|
aws s3 sync s3://new.$SITE s3://$SITE --delete
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user