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=""
while [[ "$1" != "" ]]; do
case "$1" in
"--new") TARGET="new";;
"--promote") TARGET="promote";;
"--staging") TARGET="staging";;
"--production") TARGET="production";;
esac
shift
done
if [[ "$TARGET" == "" ]]; then
echo "Please choose either --new or --promote for the target."
echo "Please choose either --staging or --production for the target."
exit
fi
if [[ "$TARGET" == "new" ]]; then
if [[ "$TARGET" == "staging" ]]; then
find "$ROOT" -name ".DS_Store" 2>/dev/null | xargs rm &>/dev/null
if grunt test; then
echo "Preparing to upload to S3..."