Permalink
Browse files

Don' show any output when file not changed.

  • Loading branch information...
1 parent e8aaa40 commit f366981ac847973137dbd1d4f9cf7b3480f9e3e9 @miloops committed Oct 4, 2011
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/jammit/s3_uploader.rb
@@ -71,15 +71,15 @@ def upload_from_glob(glob)
use_gzip = true
remote_path = remote_path.gsub(/\.gz$/, "")
end
-
+
# check if the file already exists on s3
begin
obj = @bucket.objects.find_first(remote_path)
rescue
obj = nil
end
- # if the object does not exist, or if the MD5 Hash / etag of the
+ # if the object does not exist, or if the MD5 Hash / etag of the
# file has changed, upload it
if !obj || (obj.etag != Digest::MD5.hexdigest(File.read(local_path)))
@@ -97,8 +97,6 @@ def upload_from_glob(glob)
log "File changed and will be invalidated in cloudfront: #{remote_path}"
@changed_files << remote_path
end
- else
- log "file has not changed: #{remote_path}"
end
end
end
@@ -118,7 +116,7 @@ def find_or_create_bucket
bucket
end
end
-
+
def invalidate_cache(files)
paths = ""
files.each do |key|

0 comments on commit f366981

Please sign in to comment.