Skip to content

Commit

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

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

permissions:
id-token: write
Expand Down
9 changes: 4 additions & 5 deletions tools/cdn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ 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")

# 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
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 24eeb71

Please sign in to comment.