MCPcopy Create free account
hub / github.com/apache/arrow / download_distribution

Method download_distribution

dev/release/binary-task.rb:1270–1305  ·  view source on GitHub ↗
(type,
                            distribution,
                            destination,
                            target,
                            pattern: nil,
                            pref

Source from the content-addressed store, hash-verified

1268 end
1269
1270 def download_distribution(type,
1271 distribution,
1272 destination,
1273 target,
1274 pattern: nil,
1275 prefix: nil)
1276 mkdir_p(destination, verbose: verbose?) unless File.exist?(destination)
1277 existing_paths = {}
1278 Pathname(destination).glob("**/*") do |path|
1279 next if path.directory?
1280 existing_paths[path.to_s] = true
1281 end
1282 options = {
1283 destination: destination,
1284 distribution: distribution,
1285 pattern: pattern,
1286 prefix: prefix,
1287 target: target,
1288 }
1289 options[:rc] = rc if target == :rc
1290 if type == :artifactory
1291 options[:api_key] = artifactory_api_key
1292 options[:staging] = staging?
1293 downloader = ArtifactoryDownloader.new(**options)
1294 else
1295 options[:asf_user] = asf_user
1296 options[:asf_password] = asf_password
1297 downloader = MavenRepositoryDownloader.new(**options)
1298 end
1299 downloader.download do |output_path|
1300 existing_paths.delete(output_path)
1301 end
1302 existing_paths.each_key do |path|
1303 rm_f(path, verbose: verbose?)
1304 end
1305 end
1306
1307 def release_distribution(distribution,
1308 list: nil,

Callers

nothing calls this directly

Calls 6

exist?Method · 0.80
directory?Method · 0.80
to_sMethod · 0.45
newMethod · 0.45
downloadMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected