Skip to content

Commit

Permalink
fix elapsed time
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilNarayana committed Feb 8, 2024
1 parent 14ea0aa commit f54fd7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tools/notarize_netplay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ filepath=${1:?"need a filepath"}
echo "Attempting notarization"

# Submit the DMG for notarization and wait for the flow to finish
s_time=$(date +%s)
response=$(xcrun notarytool submit ${filepath} \
--wait \
--issuer ${APPLE_ISSUER_ID} \
--key-id ${APPLE_API_KEY} \
--key ~/private_keys/AuthKey_${APPLE_API_KEY}.p8)

# Get the notarization job ID from the response
e_time=$(date +%s)
job_id_line=$(grep -m 1 ' id:' < <(echo -e "${response}"))
job_id=$(echo "${job_id_line}" | cut -d ":" -s -f 2 | cut -d " " -f 2)

# Log some debug timing info.
n_time=$((e_time - n_time))
e_time=$(date +%s)
n_time=$((e_time - s_time))
echo "Notarization call completed after ${n_time} seconds. Job ID: ${job_id}"

# Extract the status of the notarization job.
Expand Down

0 comments on commit f54fd7b

Please sign in to comment.