File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -373,20 +373,23 @@ S3_CP="aws s3 cp"
373373S3_BUCKET=" $AWS_CODE_DEPLOY_S3_BUCKET "
374374S3_FULL_BUCKET=" $S3_BUCKET "
375375
376+ # Resolve dynamic
377+ AWS_CODE_DEPLOY_S3_FILENAME=$AWS_CODE_DEPLOY_S3_FILENAME
378+
376379# Strip off any "/" from front and end, but allow inside
377380S3_KEY_PREFIX=$( echo " ${AWS_CODE_DEPLOY_S3_KEY_PREFIX} " | sed ' s/^\/\?\(.*[^\/]\)\/\?$/\1/' )
378381
379382if [ ! -z " $S3_KEY_PREFIX " ]; then
380- S3_FULL_BUCKET=" $S3_FULL_BUCKET / $ S3_KEY_PREFIX"
383+ S3_FULL_BUCKET=" ${ S3_FULL_BUCKET} / ${ S3_KEY_PREFIX} "
381384fi
382385
383386if [ " $AWS_CODE_DEPLOY_S3_SSE " == " true" ]; then
384- S3_CP=" $S3_CP --sse AES256"
387+ S3_CP=" ${ S3_CP} --sse AES256"
385388fi
386389
387- runCommand " $S3_CP \" $APP_LOCAL_TEMP_FILE \" \" s3://$S3_FULL_BUCKET / $ AWS_CODE_DEPLOY_S3_FILENAME\" " \
388- " Unable to copy bundle \" $APP_LOCAL_TEMP_FILE \" to S3" \
389- " Successfully copied bundle \" $APP_LOCAL_TEMP_FILE \" to s3://$S3_FULL_BUCKET / $ AWS_CODE_DEPLOY_S3_FILENAME"
390+ runCommand " $S3_CP \" $APP_LOCAL_TEMP_FILE \" \" s3://${ S3_FULL_BUCKET} / ${ AWS_CODE_DEPLOY_S3_FILENAME} \" " \
391+ " Unable to copy bundle \" ${ APP_LOCAL_TEMP_FILE} \" to S3" \
392+ " Successfully copied bundle \" ${ APP_LOCAL_TEMP_FILE} \" to s3://${ S3_FULL_BUCKET} / ${ AWS_CODE_DEPLOY_S3_FILENAME} "
390393
391394
392395
You can’t perform that action at this time.
0 commit comments