Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion dev/release/03-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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=
Expand Down