Refactoring tests and moving code to common module
1. All tests have been converted into regular command-line mocha tests (instead of running in the browser), and the deployment script has been changed to automatically fail any `--new` deployment which doesn't pass. 2. Several small class (e.g., `Logger`) have been moved into a common module, `crafting-guide-common` so that they may be shared between the client and server.
This commit is contained in:
+7
-4
@@ -20,10 +20,13 @@ fi
|
||||
|
||||
if [[ "$TARGET" == "new" ]]; then
|
||||
find "$ROOT" -name ".DS_Store" | xargs rm
|
||||
grunt clean dist
|
||||
echo "Preparing to upload to S3..."
|
||||
s3cmd sync -r --delete-removed --add-header="cache-control:max-age=1800" "$ROOT/" "s3://new.$SITE/"
|
||||
grunt clean build
|
||||
if grunt dist; then
|
||||
echo "Preparing to upload to S3..."
|
||||
s3cmd sync -r --delete-removed --add-header="cache-control:max-age=1800" "$ROOT/" "s3://new.$SITE/"
|
||||
grunt clean build
|
||||
else
|
||||
echo "Aborting deployment"
|
||||
fi
|
||||
elif [[ "$TARGET" == "promote" ]]; then
|
||||
aws s3 sync "s3://new.$SITE" "s3://$SITE" --delete
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user