diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef3ba1d..45ce3c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,7 @@ name: Build on: push: - # TODO: remove update_preversion before merging - branches: [ master, update_preversion ] + branches: [ master ] permissions: id-token: write diff --git a/tools/cdn.sh b/tools/cdn.sh index b621b2e..e73293b 100755 --- a/tools/cdn.sh +++ b/tools/cdn.sh @@ -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…"