diff --git a/aries/wrappers/uniffi-aries-vcx/scripts/ios.build.cargo.sh b/aries/wrappers/uniffi-aries-vcx/scripts/ios.build.cargo.sh index ee78e90e3a..76a8eee7b9 100755 --- a/aries/wrappers/uniffi-aries-vcx/scripts/ios.build.cargo.sh +++ b/aries/wrappers/uniffi-aries-vcx/scripts/ios.build.cargo.sh @@ -174,37 +174,44 @@ if [ "$RELEASE_ID" == "null" ]; then echo "Release not found for tag: $TAG" - exit 1 - fi - + else echo "Found release ID: $RELEASE_ID" - # Fetch all assets for the release - ASSET_URL="https://api.github.com/repos/$REPO/releases/$RELEASE_ID/assets" - ASSETS_JSON=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "$ASSET_URL") + # Delete the release + echo "Deleting release with ID: $RELEASE_ID" + curl -s -X DELETE -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$REPO/releases/$RELEASE_ID" - # Check if assets are available - if [ "$(echo "$ASSETS_JSON" | jq -r '.[] | length')" -eq 0 ]; then - echo "No assets found for release ID: $RELEASE_ID" - exit 1 + echo "Release deletion complete." fi - # List all assets - echo "Assets for release ID $RELEASE_ID:" - echo "$ASSETS_JSON" | jq -r '.[] | "\(.id): \(.name)"' - - # Extract asset ID(s) of the asset with the same name - ASSET_IDS=$(echo "$ASSETS_JSON" | jq -r ".[] | select(.name == \"$ASSET_NAME\") | .id") - - if [ -z "$ASSET_IDS" ]; then - echo "No asset found with name: $ASSET_NAME" - else - # Delete the existing asset(s) - for ASSET_ID in $ASSET_IDS; do - echo "Deleting existing asset with ID: $ASSET_ID" - curl -s -X DELETE -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$REPO/releases/assets/$ASSET_ID" - done - fi + # echo "Found release ID: $RELEASE_ID" + + # # Fetch all assets for the release + # ASSET_URL="https://api.github.com/repos/$REPO/releases/$RELEASE_ID/assets" + # ASSETS_JSON=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "$ASSET_URL") + + # # Check if assets are available + # if [ "$(echo "$ASSETS_JSON" | jq -r '.[] | length')" -eq 0 ]; then + # echo "No assets found for release ID: $RELEASE_ID" + # exit 1 + # fi + + # # List all assets + # echo "Assets for release ID $RELEASE_ID:" + # echo "$ASSETS_JSON" | jq -r '.[] | "\(.id): \(.name)"' + + # # Extract asset ID(s) of the asset with the same name + # ASSET_IDS=$(echo "$ASSETS_JSON" | jq -r ".[] | select(.name == \"$ASSET_NAME\") | .id") + + # if [ -z "$ASSET_IDS" ]; then + # echo "No asset found with name: $ASSET_NAME" + # else + # # Delete the existing asset(s) + # for ASSET_ID in $ASSET_IDS; do + # echo "Deleting existing asset with ID: $ASSET_ID" + # curl -s -X DELETE -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$REPO/releases/assets/$ASSET_ID" + # done + # fi echo "Asset delete process complete."