Skip to content

Commit 14a2372

Browse files
author
Victor George
committed
* 'dev' of https://github.com/appirio-tech/connect-app: fix path fix path fix deployment
2 parents d597c78 + a5c4193 commit 14a2372

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

deploy.sh

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,17 @@ deploy_s3bucket() {
2626
S3_CACHE_OPTIONS="--cache-control max-age=0,s-maxage=86400"
2727
fi
2828

29-
S3_OPTIONS='--exclude "*.txt" --exclude "*.js" --exclude "*.css"'
30-
S3_OPTIONS=(
31-
--exclude \"*.txt\"
32-
--exclude \"*.js\"
33-
--exclude \"*.css\" )
34-
echo aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} ${S3_CACHE_OPTIONS} ${S3_OPTIONS[@]}
35-
aws s3 sync --dryrun ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} ${S3_CACHE_OPTIONS} ${S3_OPTIONS[@]}
36-
result=`aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} ${S3_CACHE_OPTIONS} ${S3_OPTIONS[@]}`
29+
aws s3 sync --dryrun ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --exclude "*.txt" --exclude "*.js" --exclude "*.css" ${S3_CACHE_OPTIONS}
30+
result=$(aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --exclude "*.txt" --exclude "*.js" --exclude "*.css" ${S3_CACHE_OPTIONS})
3731
if [ $? -eq 0 ]; then
3832
echo "All html, font, image, map and media files are Deployed without gzip encoding!"
3933
else
4034
echo "Deployment Failed - $result"
4135
exit 1
4236
fi
4337

44-
S3_OPTIONS=(
45-
--exclude \"*\"
46-
--include \"*.txt\"
47-
--include \"*.js\"
48-
--include \"*.css\"
49-
--content-encoding gzip)
50-
echo aws s3 sync --dryrun ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} ${S3_CACHE_OPTIONS} ${S3_OPTIONS[@]}
51-
aws s3 sync --dryrun ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} ${S3_CACHE_OPTIONS} ${S3_OPTIONS[@]}
52-
result=$(aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} ${S3_CACHE_OPTIONS} ${S3_OPTIONS[@]})
38+
aws s3 sync --dryrun ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --exclude "*" --include "*.txt" --include "*.js" --include "*.css" --content-encoding gzip ${S3_CACHE_OPTIONS}
39+
result=$(aws s3 sync ${HOME}/${CIRCLE_PROJECT_REPONAME}/dist s3://${AWS_S3_BUCKET} --exclude "*" --include "*.txt" --include "*.js" --include "*.css" --content-encoding gzip ${S3_CACHE_OPTIONS})
5340
if [ $? -eq 0 ]; then
5441
echo "All txt, css, and js files are Deployed! with gzip"
5542
else

0 commit comments

Comments
 (0)