Skip to content

Commit

Permalink
name offline site zip with short_id instead of name (#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
gumaerc authored Oct 27, 2022
1 parent 75ce6fe commit dcc3d5e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ jobs:
echo "STARTING S3 SYNC FOR $NAME" > /dev/tty
# START OFFLINE-ONLY
cd $CURDIR/$SHORT_ID/public
zip $NAME.zip -r ./
PUBLISH_S3_RESULT=$(aws s3((cli-endpoint-url)) sync ./ s3://((ocw-bucket))$PREFIX/$BASE_URL --exclude="*" --include="$NAME.zip" --metadata site-id=$NAME --only-show-errors) || PUBLISH_S3_RESULT=1
zip $SHORT_ID.zip -r ./
PUBLISH_S3_RESULT=$(aws s3((cli-endpoint-url)) sync ./ s3://((ocw-bucket))$PREFIX/$BASE_URL --exclude="*" --include="$SHORT_ID.zip" --metadata site-id=$NAME --only-show-errors) || PUBLISH_S3_RESULT=1
if [[ $PUBLISH_S3_RESULT == 1 ]]
then
echo "SYNCING $NAME.zip to s3://((ocw-bucket))$PREFIX/$SITE_URL failed for $NAME" > /dev/tty
echo "SYNCING $SHORT_ID.zip to s3://((ocw-bucket))$PREFIX/$SITE_URL failed for $NAME" > /dev/tty
return 1
fi
rm $NAME.zip
rm $SHORT_ID.zip
cd $CURDIR
# END OFFLINE-ONLY
# START ONLINE-ONLY
Expand Down

0 comments on commit dcc3d5e

Please sign in to comment.