From 10d8f4ce5fd9008ac6fcddcf953caeb2fbf77b2e Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Tue, 21 Nov 2023 10:36:23 +0000 Subject: [PATCH 1/2] Enable eclipse-notarize.sh curl failure info Signed-off-by: Andrew Leonard --- codesign/eclipse-notarize.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/codesign/eclipse-notarize.sh b/codesign/eclipse-notarize.sh index 0c6eba8b3..a6b216481 100755 --- a/codesign/eclipse-notarize.sh +++ b/codesign/eclipse-notarize.sh @@ -14,19 +14,24 @@ # limitations under the License. ################################################################################ -set -eu - PKG="$1" PRIMARY_BUNDLE_ID="$2" echo "Notarizing $1, this can take a while! Updating status every minute..." -RESPONSE=$(curl -s -X POST -F file=@${PKG} -F 'options={"primaryBundleId": "'${PRIMARY_BUNDLE_ID}'", "staple": true};type=application/json' https://cbi.eclipse.org/macos/xcrun/notarize) +RESPONSE=$(curl -s -X POST -F file=@${PKG} -F 'options={"primaryBundleId": "'${PRIMARY_BUNDLE_ID}'", "staple": true};type=application/json' https://cbi.eclipse.org/macos/xcrun/notarize 2>&1) +CURL_RC=$? +echo "$RESPONSE" +if [ $CURL_RC -ne 0 ]; then + echo "Notarize service curl failed rc=$CURL_RC" + exit $CURL_RC +fi UUID=$(echo $RESPONSE | grep -Po '"uuid"\s*:\s*"\K[^"]+') STATUS=$(echo $RESPONSE | grep -Po '"status"\s*:\s*"\K[^"]+') while [[ ${STATUS} == 'IN_PROGRESS' ]]; do + echo "Waiting for notarize service response..." sleep 1m RESPONSE=$(curl -s https://cbi.eclipse.org/macos/xcrun/${UUID}/status) STATUS=$(echo $RESPONSE | grep -Po '"status"\s*:\s*"\K[^"]+') @@ -40,3 +45,9 @@ if [[ ${STATUS} != 'COMPLETE' ]]; then fi curl -o "$PKG" https://cbi.eclipse.org/macos/xcrun/${UUID}/download +CURL_RC=$? +if [ $CURL_RC -ne 0 ]; then + echo "curl download of notarized pkg failed, failed rc=$CURL_RC" + exit $CURL_RC +fi + From 799202e20399935313e81c061df9d97c5a3f2420 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Tue, 21 Nov 2023 10:58:58 +0000 Subject: [PATCH 2/2] Enable eclipse-notarize.sh curl failure info Signed-off-by: Andrew Leonard --- codesign/eclipse-notarize.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codesign/eclipse-notarize.sh b/codesign/eclipse-notarize.sh index a6b216481..78d9e9497 100755 --- a/codesign/eclipse-notarize.sh +++ b/codesign/eclipse-notarize.sh @@ -21,9 +21,9 @@ echo "Notarizing $1, this can take a while! Updating status every minute..." RESPONSE=$(curl -s -X POST -F file=@${PKG} -F 'options={"primaryBundleId": "'${PRIMARY_BUNDLE_ID}'", "staple": true};type=application/json' https://cbi.eclipse.org/macos/xcrun/notarize 2>&1) CURL_RC=$? -echo "$RESPONSE" if [ $CURL_RC -ne 0 ]; then echo "Notarize service curl failed rc=$CURL_RC" + echo "$RESPONSE" exit $CURL_RC fi