Add CircleCI configuration for deployment

This commit is contained in:
Andrew Miner
2015-04-28 10:12:56 -07:00
parent aad88e9465
commit c528fc4eab
2 changed files with 13 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
deployment:
staging:
branch: staging
commands:
- ./scripts/deploy --staging
production:
branch: production
commands:
- ./scripts/deploy --production
+4 -4
View File
@@ -7,18 +7,18 @@ SITE="crafting-guide.com"
TARGET="" TARGET=""
while [[ "$1" != "" ]]; do while [[ "$1" != "" ]]; do
case "$1" in case "$1" in
"--new") TARGET="new";; "--staging") TARGET="staging";;
"--promote") TARGET="promote";; "--production") TARGET="production";;
esac esac
shift shift
done done
if [[ "$TARGET" == "" ]]; then if [[ "$TARGET" == "" ]]; then
echo "Please choose either --new or --promote for the target." echo "Please choose either --staging or --production for the target."
exit exit
fi fi
if [[ "$TARGET" == "new" ]]; then if [[ "$TARGET" == "staging" ]]; then
find "$ROOT" -name ".DS_Store" 2>/dev/null | xargs rm &>/dev/null find "$ROOT" -name ".DS_Store" 2>/dev/null | xargs rm &>/dev/null
if grunt test; then if grunt test; then
echo "Preparing to upload to S3..." echo "Preparing to upload to S3..."