You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by em...@apache.org on 2019/07/13 06:45:25 UTC
[arrow] branch master updated: ARROW-5941: [Release] Avoid
re-uploading already uploaded binary artifacts
This is an automated email from the ASF dual-hosted git repository.
emkornfield pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new a0ee637 ARROW-5941: [Release] Avoid re-uploading already uploaded binary artifacts
a0ee637 is described below
commit a0ee6377ce5931db11178ab8bd2517407aa6561a
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Fri Jul 12 23:44:38 2019 -0700
ARROW-5941: [Release] Avoid re-uploading already uploaded binary artifacts
It reduces the number of Bintray API calls and upload time when we
retry uploading binary artifacts.
Author: Sutou Kouhei <ko...@clear-code.com>
Closes #4872 from kou/release-post-binary-avoid-reupload and squashes the following commits:
0b296e946 <Sutou Kouhei> Avoid re-uploading already uploaded binary artifacts
---
dev/release/post-02-binary.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dev/release/post-02-binary.sh b/dev/release/post-02-binary.sh
index 4e1e34f..d278840 100755
--- a/dev/release/post-02-binary.sh
+++ b/dev/release/post-02-binary.sh
@@ -43,6 +43,8 @@ fi
: ${BINTRAY_REPOSITORY:=apache/arrow}
+BINTRAY_DOWNLOAD_URL_BASE=https://dl.bintray.com
+
docker_image_name=apache-arrow/release-binary
bintray() {
@@ -100,7 +102,7 @@ download_files() {
--fail \
--location \
--output ${file} \
- https://dl.bintray.com/${BINTRAY_REPOSITORY}/${file}
+ ${BINTRAY_DOWNLOAD_URL_BASE}/${BINTRAY_REPOSITORY}/${file}
done
}
@@ -119,6 +121,15 @@ upload_file() {
local path=$3
local sha256=$(shasum -a 256 ${path} | awk '{print $1}')
+ local download_path=/${BINTRAY_REPOSITORY}/${target}/${path}
+ if curl \
+ --fail \
+ --head \
+ ${BINTRAY_DOWNLOAD_URL_BASE}${download_path} | \
+ grep -q "^X-Checksum-Sha2: ${sha256}"; then
+ return 0
+ fi
+
local request_path=/content/${BINTRAY_REPOSITORY}/${target}/${version}/${target}/${path}
if ! bintray \
PUT ${request_path} \