You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/07/13 17:02:38 UTC
[arrow] 43/43: ARROW-5940: [Release] Add support for re-uploading
sign/checksum for binary artifacts
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch maint-0.14.x
in repository https://gitbox.apache.org/repos/asf/arrow.git
commit d5f74a4ee14c34c7c8c94ad9e83ca7e9b5459957
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Sat Jul 13 11:27:25 2019 -0500
ARROW-5940: [Release] Add support for re-uploading sign/checksum for binary artifacts
If we fail to upload sign or checksum for a binary artifact, they
aren't re-uploaded without this change.
Author: Sutou Kouhei <ko...@clear-code.com>
Closes #4871 from kou/release-binary-sign-only-reupload and squashes the following commits:
fd6f3d484 <Sutou Kouhei> Add support for re-uploading sign/checksum for binary artifacts
---
dev/release/03-binary.sh | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/dev/release/03-binary.sh b/dev/release/03-binary.sh
index 92cfaaf..22bb96d 100755
--- a/dev/release/03-binary.sh
+++ b/dev/release/03-binary.sh
@@ -248,18 +248,18 @@ sign_and_upload_file() {
local sha256=$(shasum -a 256 ${local_path} | awk '{print $1}')
local download_path=/${BINTRAY_REPOSITORY}/${target}-rc/${upload_path}
- if curl \
+ local source_upload=no
+ if ! curl \
--fail \
--head \
${BINTRAY_DOWNLOAD_URL_BASE}${download_path} | \
grep -q "^X-Checksum-Sha2: ${sha256}"; then
- return 0
+ upload_file ${version} ${rc} ${target} ${local_path} ${upload_path}
+ source_upload=yes
fi
- upload_file ${version} ${rc} ${target} ${local_path} ${upload_path}
-
local suffix=
- for suffix in asc sha256 sha512; do
+ for suffix in asc sha512; do
pushd $(dirname ${local_path})
local local_path_base=$(basename ${local_path})
local output_dir=$(mktemp -d -t "arrow-binary-sign.XXXXX")
@@ -278,7 +278,18 @@ sign_and_upload_file() {
${local_path_base} > ${output}
;;
esac
- upload_file ${version} ${rc} ${target} ${output} ${upload_path}.${suffix}
+ local need_upload=no
+ if [ "${source_upload}" = "yes" ]; then
+ need_upload=yes
+ elif ! curl \
+ --fail \
+ --head \
+ ${BINTRAY_DOWNLOAD_URL_BASE}${download_path}.${suffix}; then
+ need_upload=yes
+ fi
+ if [ "${need_upload}" = "yes" ]; then
+ upload_file ${version} ${rc} ${target} ${output} ${upload_path}.${suffix}
+ fi
rm -rf ${output_dir}
popd
done