pull/5370/head
filip mertens 9 months ago
parent 732c656044
commit 486118d6a4
  1. 20
      apps/remixdesktop/notarizedmg.sh

@ -6,28 +6,34 @@ JSON_FILE="dmgs.json"
# Read the DMGs array from the JSON file
DMG_PATHS=$(jq -r '.dmgs[]' "$JSON_FILE")
echo $DMG_PATHS
xcrun notarytool store-credentials "notarytool-password" \
--apple-id ${APPLE_ID} \
--team-id ${APPLE_TEAM_ID} \
--password ${APPLE_ID_PASSWORD}
# Loop over the DMG paths
for DMG_PATH in $DMG_PATHS; do
# Use jq to parse the DMGs array and read each line
while IFS= read -r DMG_PATH; do
# Remove single quotes from the path if present
DMG_PATH_CLEANED=$(echo $DMG_PATH | tr -d "'")
echo "Submitting $DMG_PATH_CLEANED for notarization..."
# Run your notarytool submit command here
# Ensure you replace `your-app-specific-args` with actual arguments for your app
xcrun notarytool submit "$DMG_PATH_CLEANED" --keychain-profile "notarytool-password" --wait
# Replace `your-app-specific-args` with the actual arguments for your app
# Ensure your notarytool command and arguments are correct for your application
notarytool submit "$DMG_PATH_CLEANED" --keychain-profile "notarytool-password" --wait
# Check for success/failure if necessary
# Check the command's success
if [ $? -eq 0 ]; then
echo "Successfully submitted $DMG_PATH_CLEANED for notarization."
xcrun stapler staple "$DMG_PATH_CLEANED"
echo "Successfully stapled $DMG_PATH_CLEANED."
spctl -a -t open -vvv --context context:primary-signature "$DMG_PATH_CLEANED"
echo "Successfully checked $DMG_PATH_CLEANED."
else
echo "Failed to submit $DMG_PATH_CLEANED for notarization."
fi
done
done < <(jq -r '.dmgs[]' "$JSON_FILE")
echo "All DMG submissions completed."

Loading…
Cancel
Save