Skip to content

Commit

Permalink
tools: improve macOS notarization process output readability
Browse files Browse the repository at this point in the history
PR-URL: #50389
Fixes: nodejs/build#3529
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
UlisesGascon authored and richardlau committed Nov 7, 2023
1 parent ad32603 commit 0aaab45
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions tools/osx-notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,19 @@ fi
# Submit the package for notarization
# TODO(@ulisesGascon): refactor to use --keychain-profile
# when https://github.com/nodejs/build/issues/3385#issuecomment-1729281269 is ready
notarization_output=$(
xcrun notarytool submit \
--apple-id "$NOTARIZATION_ID" \
--password "$NOTARIZATION_PASSWORD" \
--team-id "$NOTARIZATION_TEAM_ID" \
--wait \
"node-$pkgid.pkg" 2>&1
)
echo "Submitting node-$pkgid.pkg for notarization..."

xcrun notarytool submit \
--apple-id "$NOTARIZATION_ID" \
--password "$NOTARIZATION_PASSWORD" \
--team-id "$NOTARIZATION_TEAM_ID" \
--wait \
"node-$pkgid.pkg"

if [ $? -eq 0 ]; then
# Extract the operation ID from the output
operation_id=$(echo "$notarization_output" | awk '/RequestUUID/ {print $NF}')
echo "Notarization submitted. Operation ID: $operation_id"
echo "Notarization node-$pkgid.pkg submitted successfully."
exit 0
else
echo "Notarization failed. Error: $notarization_output"
echo "Notarization node-$pkgid.pkg failed."
exit 1
fi

0 comments on commit 0aaab45

Please sign in to comment.