Skip to content

Commit

Permalink
Create a new packagecloud Package for each upload. Current API cannot…
Browse files Browse the repository at this point in the history
… re-read package File contents.

Found during work on git-lfs#1074. See also computology/packagecloud-ruby#14 .

Signed-off-by: Brett Randall <[email protected]>
  • Loading branch information
javabrett committed Mar 22, 2016
1 parent 8f90f59 commit d656793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/packagecloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def distro_names_for(filename)
package_files = Dir.glob("repos/**/*.rpm") + Dir.glob("repos/**/*.deb")
package_files.each do |full_path|
next if full_path =~ /repo-release/
pkg = Packagecloud::Package.new(:file => full_path)
distro_names = distro_names_for(full_path)
distro_names.map do |distro_name|
distro_id = $distro_id_map[distro_name] ||= $client.find_distribution_id(distro_name)
Expand All @@ -67,6 +66,7 @@ def distro_names_for(filename)
end

puts "pushing #{full_path} to #{$distro_id_map.key(distro_id).inspect}"
pkg = Packagecloud::Package.new(:file => full_path)
$client.put_package("git-lfs", pkg, distro_id)
end
end
Expand Down

0 comments on commit d656793

Please sign in to comment.