Skip to content

Commit

Permalink
ARROW-17476: [Release][Packaging] Make binary uploader reusable from …
Browse files Browse the repository at this point in the history
…datafusion-c (#13923)

Binary uploader is dev/release/05-binary-upload.sh and
dev/release/post-02-binary.sh. We need to customize .deb package
name.

This also adds missing environment variable entries.

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou committed Aug 21, 2022
1 parent 94fc257 commit fa33ca4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions dev/release/05-binary-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ docker_run \
APT_TARGETS=$(IFS=,; echo "${apt_targets[*]}") \
ARTIFACTORY_API_KEY="${ARTIFACTORY_API_KEY}" \
ARTIFACTS_DIR="${tmp_dir}/artifacts" \
DEB_PACKAGE_NAME=${DEB_PACKAGE_NAME:-} \
DRY_RUN=${DRY_RUN:-no} \
GPG_KEY_ID="${GPG_KEY_ID}" \
RC=${rc} \
STAGING=${STAGING:-no} \
VERSION=${version} \
Expand Down
13 changes: 8 additions & 5 deletions dev/release/binary-task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def close

def request(method, headers, url, body: nil, &block)
request = build_request(method, url, headers, body: body)
if ENV["DRY_RUN"]
if ENV["DRY_RUN"] == "yes"
case request
when Net::HTTP::Get, Net::HTTP::Head
else
Expand Down Expand Up @@ -1302,10 +1302,13 @@ def define_apt_rc_tasks
Dir.glob("#{source_dir_prefix}*/**/*") do |path|
next if File.directory?(path)
base_name = File.basename(path)
if base_name.start_with?("apache-arrow-apt-source")
package_name = "apache-arrow-apt-source"
else
package_name = "apache-arrow"
package_name = ENV["DEB_PACKAGE_NAME"]
if package_name.nil? or package_name.empty?
if base_name.start_with?("apache-arrow-apt-source")
package_name = "apache-arrow-apt-source"
else
package_name = "apache-arrow"
end
end
destination_path = [
pool_dir,
Expand Down

0 comments on commit fa33ca4

Please sign in to comment.