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 eb0b0fdb87d500488d503843cebf90850899941f Author: Sutou Kouhei <[email protected]> AuthorDate: Sun Jun 30 16:19:00 2019 +0900 ARROW-5794: [Release] Skip uploading already uploaded binaries Author: Sutou Kouhei <[email protected]> Closes #4754 from kou/release-skip-uploaded-binary and squashes the following commits: e8cd528b4 <Sutou Kouhei> Skip already uploaded file --- dev/release/03-binary.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dev/release/03-binary.sh b/dev/release/03-binary.sh index 74602cd..f3f418c 100755 --- a/dev/release/03-binary.sh +++ b/dev/release/03-binary.sh @@ -73,6 +73,8 @@ fi : ${BINTRAY_REPOSITORY:=apache/arrow} : ${SOURCE_BINTRAY_REPOSITORY:=${BINTRAY_REPOSITORY}} +BINTRAY_DOWNLOAD_URL_BASE=https://dl.bintray.com + docker_run() { docker \ run \ @@ -194,7 +196,7 @@ download_files() { --fail \ --location \ --output ${file} \ - https://dl.bintray.com/${SOURCE_BINTRAY_REPOSITORY}/${file} & + ${BINTRAY_DOWNLOAD_URL_BASE}/${SOURCE_BINTRAY_REPOSITORY}/${file} & done } @@ -244,6 +246,16 @@ sign_and_upload_file() { local local_path=$4 local upload_path=$5 + local sha256=$(shasum -a 256 ${local_path} | awk '{print $1}') + local download_path=/${BINTRAY_REPOSITORY}/${target}-rc/${upload_path} + if curl \ + --fail \ + --head \ + ${BINTRAY_DOWNLOAD_URL_BASE}${download_path} | \ + grep -q "^X-Checksum-Sha2: ${sha256}"; then + return 0 + fi + upload_file ${version} ${rc} ${target} ${local_path} ${upload_path} local suffix=
