Skip to content

Commit 7e3aad7

Browse files
authored
GH-47933: [Release][R] Don't upload *.sha512.{asc,sha512} (#47982)
### Rationale for this change R binary CI jobs already create `.sha512` checksum files, but the upload script was signing and checksumming them again, creating redundant `.sha512.asc` and `.sha512.sha512` files. ### What changes are included in this PR? Skip signing and checksumming for files that already end in `.sha512`. ### Are these changes tested? Reviewed manually. The bash pattern matching correctly identifies and skips `.sha512` files. ### Are there any user-facing changes? No. This only reduces redundant files in release artifacts. * GitHub Issue: #47933 Authored-by: Nic Crane <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent d0e098f commit 7e3aad7

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

dev/release/05-binary-upload.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,18 @@ upload_to_github_release() {
8686
local base_name
8787
base_name="$(basename "${target}")"
8888
cp -a "${target}" "${dist_dir}/${base_name}"
89-
gpg \
90-
--armor \
91-
--detach-sign \
92-
--local-user "${GPG_KEY_ID}" \
93-
--output "${dist_dir}/${base_name}.asc" \
94-
"${target}"
95-
pushd "${dist_dir}"
96-
shasum -a 512 "${base_name}" >"${base_name}.sha512"
97-
popd
89+
# Skip signing/checksumming .sha512 files (e.g., R binaries already include checksums from CI)
90+
if [[ "${base_name}" != *.sha512 ]]; then
91+
gpg \
92+
--armor \
93+
--detach-sign \
94+
--local-user "${GPG_KEY_ID}" \
95+
--output "${dist_dir}/${base_name}.asc" \
96+
"${target}"
97+
pushd "${dist_dir}"
98+
shasum -a 512 "${base_name}" >"${base_name}.sha512"
99+
popd
100+
fi
98101
done
99102
gh release upload \
100103
--repo apache/arrow \

0 commit comments

Comments
 (0)