Skip to content

Commit

Permalink
Test error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dhinakg committed Sep 19, 2023
1 parent 3853eaf commit 1e94df8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions codesign/appsign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,17 @@ notarizefile() { # $1: path to file to notarize, $2: identifier
# Upload file
echo "Uploading ${filepath} for notarization for ${asc_provider}"
notarytoolOutput=$(xcrun notarytool submit \
"$filepath" \
--apple-id "${MAC_ACCOUNT_NAME}" \
--password "${MAC_ACCOUNT_PASSWORD}" \
--team-id "${asc_provider}" \
--output-format plist \
--wait)
"$filepath" \
--apple-id "${MAC_ACCOUNT_NAME}" \
--password "ERROR ${MAC_ACCOUNT_PASSWORD}" \
--team-id "${asc_provider}" \
--output-format plist \
--wait)

requestUUID="$(echo "${notarytoolOutput}" | plutil -extract id raw -)"
requestStatus="$(echo "${notarytoolOutput}" | plutil -extract status raw -)"

# This will handle errors as well
if [ "$requestStatus" != "Accepted" ]; then
abort "Could not notarize ${filepath}: ${notarytoolOutput}"
fi
Expand Down

0 comments on commit 1e94df8

Please sign in to comment.