lib/fastlane/plugin/polidea/actions/s3.rb in fastlane-plugin-polidea-0.2.1 vs lib/fastlane/plugin/polidea/actions/s3.rb in fastlane-plugin-polidea-0.2.2

- old
+ new

@@ -356,16 +356,10 @@ files.each do |file| local_path = directory_path + file s3_path = directory_name + file obj = bucket.objects[s3_path] obj.write(file: local_path, content_type: content_type_for_file(local_path), acl: "public_read") - if obj.exists? - next - end - - result = "Error while uploading file #{local_path}" - return result end end def self.files_at_path(path) files = Dir.glob(path + "/**/*") @@ -424,9 +418,10 @@ return path end def self.upload_icon(icon_path, url_part, bucket, acl) + return unless icon_path icon_file_basename = File.basename(icon_path) icon_file = File.open(icon_path) icon_file_name = "#{url_part}#{icon_file_basename}" self.upload_file(bucket, icon_file_name, icon_file, acl) end