lib/s3repo/repo.rb in s3repo-0.1.7 vs lib/s3repo/repo.rb in s3repo-0.2.0

- old
+ new

@@ -18,11 +18,12 @@ def add_packages(paths) paths.each do |path| key = File.basename(path) sig_key, sig_path = [key, path].map { |x| x + '.sig' } - client.upload!(key, path) unless include?(key) - client.upload!(sig_key, sig_path) if File.exist?(sig_path) + next if include? key + client.upload!(sig_key, sig_path) if ENV['S3REPO_SIGN_PACKAGES'] + client.upload!(key, path) end metadata.add_packages(paths) end def packages