amoeba commented on code in PR #49249:
URL: https://github.com/apache/arrow/pull/49249#discussion_r2800777064


##########
dev/release/02-source.sh:
##########
@@ -130,6 +130,15 @@ if [ ${SOURCE_VOTE} -gt 0 ]; then
   curl_options+=(--data "head=apache:${rc_branch}")
   curl_options+=(https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls)
   verify_pr_url=$(curl "${curl_options[@]}" | jq -r ".[0].html_url")
+  # Read the checksum so we can include it in the vote thread email
+  # We check if $tarball exists to detect when this script is being run by
+  # 02-source-test.rb and we fill in the hash from the test tarball in that
+  # case.
+  if [ -f "${tarball}" ]; then
+    tarball_hash=$(shasum -a 512 "${tarball}" | awk '{print $1}')
+  else
+    tarball_hash=$(curl -s 
"https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-${version}-rc${rc}/${tarball}.sha512";
 | awk '{print $1}')
+  fi

Review Comment:
   I took the above suggestion but added a check to make sure the .sha512 file 
exists. Without that, a release manager could end up with an empty footnote. I 
don't think just assuming is enough and that we should require it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to