Skip to content

Apache DataFusion SQL Query Engine

ARROW-5794: [Release] Skip uploading already uploaded binaries

Sutou Kouheia0771973dc4f
diff --git a/dev/release/03-binary.sh b/dev/release/03-binary.sh
index 74602cda74..f3f418ca64 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=