Skip to content

Commit

Permalink
remove existence check to test uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardwolff authored Jan 7, 2025
1 parent 3c3c58e commit 57f0443
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

on:
push:
# TODO: remove update_preversion before committing
# TODO: remove update_preversion before merging
branches: [ master, update_preversion ]

permissions:
Expand Down
9 changes: 5 additions & 4 deletions tools/cdn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ BUNDLE_EXISTS=$(aws s3 ls s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/ |
CDN_EXISTS=$(aws s3 ls s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/assets/ | grep "link.$CURRENT_VERSION.min.css")
ADMIN_CDN_EXISTS=$(aws s3 ls s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/assets/ | grep "admin.$CURRENT_VERSION.min.css")

if [ ! -z "$BUNDLE_EXISTS" ]; then
echo "There is already a $EXTENSION_NAME-$CURRENT_VERSION.js in the cdn. Skipping cdn publish…"
else
# TODO: uncomment this before merging
#if [ ! -z "$BUNDLE_EXISTS" ]; then
# echo "There is already a $EXTENSION_NAME-$CURRENT_VERSION.js in the cdn. Skipping cdn publish…"
#else
aws s3 cp build/bundle.js s3://assets.us.auth0.com/extensions/$EXTENSION_NAME/$EXTENSION_NAME-$CURRENT_VERSION.js --region us-west-1 --acl public-read
echo "$EXTENSION_NAME-$CURRENT_VERSION.js uploaded to the cdn"
fi
#fi

if [ ! -z "$CDN_EXISTS" ]; then
echo "There is already a link.$CURRENT_VERSION.min.css in the cdn. Skipping cdn publish…"
Expand Down

0 comments on commit 57f0443

Please sign in to comment.