Skip to content

Commit

Permalink
Trigger a non-zero exit if the satis build fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollie Treend committed May 24, 2017
1 parent 8fc0584 commit 6a9e393
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

# Adapted from run.sh in iainmckay/satis-s3
# Source: https://github.com/iainmckay/satis-s3/blob/ce9d960d54aa1e6fcb888c88f6ddc1e4cd2c7c30/run.sh
Expand Down Expand Up @@ -30,6 +31,4 @@ php $SATIS build --verbose $CONFIG_PATH $OUT_PATH
php $SATIS purge $CONFIG_PATH $OUT_PATH

# Push it back to S3
if [ $? == 0 ]; then
aws s3 sync --delete $OUT_PATH s3://$S3_BUCKET/$S3_PATH
fi
aws s3 sync --delete $OUT_PATH s3://$S3_BUCKET/$S3_PATH

0 comments on commit 6a9e393

Please sign in to comment.