Skip to content

Commit fa33ca4

Browse files
authored
ARROW-17476: [Release][Packaging] Make binary uploader reusable from datafusion-c (apache#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>
1 parent 94fc257 commit fa33ca4

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

dev/release/05-binary-upload.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ docker_run \
127127
APT_TARGETS=$(IFS=,; echo "${apt_targets[*]}") \
128128
ARTIFACTORY_API_KEY="${ARTIFACTORY_API_KEY}" \
129129
ARTIFACTS_DIR="${tmp_dir}/artifacts" \
130+
DEB_PACKAGE_NAME=${DEB_PACKAGE_NAME:-} \
131+
DRY_RUN=${DRY_RUN:-no} \
132+
GPG_KEY_ID="${GPG_KEY_ID}" \
130133
RC=${rc} \
131134
STAGING=${STAGING:-no} \
132135
VERSION=${version} \

dev/release/binary-task.rb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def close
292292

293293
def request(method, headers, url, body: nil, &block)
294294
request = build_request(method, url, headers, body: body)
295-
if ENV["DRY_RUN"]
295+
if ENV["DRY_RUN"] == "yes"
296296
case request
297297
when Net::HTTP::Get, Net::HTTP::Head
298298
else
@@ -1302,10 +1302,13 @@ def define_apt_rc_tasks
13021302
Dir.glob("#{source_dir_prefix}*/**/*") do |path|
13031303
next if File.directory?(path)
13041304
base_name = File.basename(path)
1305-
if base_name.start_with?("apache-arrow-apt-source")
1306-
package_name = "apache-arrow-apt-source"
1307-
else
1308-
package_name = "apache-arrow"
1305+
package_name = ENV["DEB_PACKAGE_NAME"]
1306+
if package_name.nil? or package_name.empty?
1307+
if base_name.start_with?("apache-arrow-apt-source")
1308+
package_name = "apache-arrow-apt-source"
1309+
else
1310+
package_name = "apache-arrow"
1311+
end
13091312
end
13101313
destination_path = [
13111314
pool_dir,

0 commit comments

Comments
 (0)