tools: improve macOS notarization process output readability

PR-URL: https://github.com/nodejs/node/pull/50389
Fixes: https://github.com/nodejs/build/issues/3529
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Ulises Gascón 2023-11-01 14:40:54 +01:00 committed by GitHub
parent 538d0c2a3f
commit d2903f9df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,22 +37,19 @@ fi
# Submit the package for notarization # Submit the package for notarization
# TODO(@ulisesGascon): refactor to use --keychain-profile # TODO(@ulisesGascon): refactor to use --keychain-profile
# when https://github.com/nodejs/build/issues/3385#issuecomment-1729281269 is ready # when https://github.com/nodejs/build/issues/3385#issuecomment-1729281269 is ready
notarization_output=$( echo "Submitting node-$pkgid.pkg for notarization..."
xcrun notarytool submit \
xcrun notarytool submit \
--apple-id "$NOTARIZATION_ID" \ --apple-id "$NOTARIZATION_ID" \
--password "$NOTARIZATION_PASSWORD" \ --password "$NOTARIZATION_PASSWORD" \
--team-id "$NOTARIZATION_TEAM_ID" \ --team-id "$NOTARIZATION_TEAM_ID" \
--wait \ --wait \
"node-$pkgid.pkg" 2>&1 "node-$pkgid.pkg"
)
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
# Extract the operation ID from the output echo "Notarization node-$pkgid.pkg submitted successfully."
operation_id=$(echo "$notarization_output" | awk '/RequestUUID/ {print $NF}')
echo "Notarization submitted. Operation ID: $operation_id"
exit 0 exit 0
else else
echo "Notarization failed. Error: $notarization_output" echo "Notarization node-$pkgid.pkg failed."
exit 1 exit 1
fi fi