53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/frm/arch_release.rb', line 53
def push
@opts[:packages].each do |p|
if @opts[:remote_store].exists?(p.info['Filename'])
STDERR.puts "package #{p.path} already exists"
unless @opts[:remote_store].etag(p.info['Filename']) == p.info['MD5sum']
raise "trying to overwrite this package file: \#{remote_path}\nlocal md5 is \#{package.info['MD5sum']}\nremote md5 (etag) is \#{@s3.etag(remote_path,@bucket)}\n"
end
else
STDERR.puts "pushing package #{p.path}"
@opts[:remote_store].put(p.info['Filename'],p.content)
end
end
STDERR.puts "pushing arch release files"
@opts[:remote_store].put(File.join("dists/#{@opts[:release]}/",@opts[:release_file_path]),@opts[:release_file])
@opts[:remote_store].put(File.join("dists/#{@opts[:release]}/",@opts[:gzipped_package_file_path]),@opts[:gzipped_package_file])
@opts[:remote_store].put(File.join("dists/#{@opts[:release]}/",@opts[:package_file_path]),@opts[:package_file])
end
|