laurilehmijoki / jekyll-s3

Push your Jekyll Blog to Amazon S3!
182 stars 20 forks source link

Detect Changes - Bug in Windows Ruby on Rails Console #55

Open Romiko opened 11 years ago

Romiko commented 11 years ago

Hi,

I am accessing the same folder used by Mac and have a Windows VM. In Windows when I run Jekyll-s3 it is always detected the same files changed when they have not changed.

MAC OUTPUT for same folder: Deploying _site/* to blog.xxx.com No new or changed files to upload Done! Go visit: http://blog.xxx.com.s3-website-us-east-1.amazonaws.com/index.html

WIndows Ruby on Rails Console Output: Y:\dev\xx\xxxBlog>jekyll-s3 Deploying _site/* to blog.xxx.com Uploading 2 changed file(s) Upload media/2013-07-11/2.jpg: Success! Upload media/2013-07-11/1.jpg: Success! Done! Go visit: http://blog.xxx.com.s3-website-us-east-1.amazonaws.com/index.html

Now, I am running Jekyll-s3 over a satellite link, and need minimum delta's to be uploaded, unfortunately my sattelite phone needs windows to run the modem as their is no Linux drivers (ISAT PRO), hence I run Jekyll-s3 from windows ROR console.

Any ideas why on windows it detects the files as always changed?

Romiko commented 11 years ago

Hi, I found a way to get my sattelite phone working on MAC. However, is it possible you guys can optimise the Jekyll-s3 command to use the absolute minimum when uploaded or posting a new blog?

laurilehmijoki commented 11 years ago

It might be possible to reduce the network usage of jekyll-s3 even further.

If you are interested in this topic, please submit a pull request to the gem s3_website. I don't develop the gem jekyll-s3 anymore.

laurilehmijoki commented 11 years ago

You can easily switch to s3_website. It is mostly backward compatible with jekyll-s3.

Romiko commented 11 years ago

Awesome, thanks I have switched to s3_website :) However in windows it has the same behaviour and always detects jpg files as changes.

On Mon, Jul 22, 2013 at 11:35 PM, Lauri Lehmijoki notifications@github.comwrote:

You can easily switch to s3_website. It is mostly backward compatible with jekyll-s3.

— Reply to this email directly or view it on GitHubhttps://github.com/laurilehmijoki/jekyll-s3/issues/55#issuecomment-21344057 .

Romiko Derbynew aka (Ranger Rom) Mobile: +61 4000 90251 Email: romikov@gmail.com

laurilehmijoki commented 11 years ago

The diff code is the same for s3_website and jekyll-s3.

Hmm, unfortunately I don't have a good guess on what could cause the diff logic to fail on Windows but not on Mac. The diff is based on last-modified timestamps and MD5 hashes. The code responsible for doing that is here: https://github.com/laurilehmijoki/filey-diff/blob/master/lib/filey-diff/comparison.rb.

If you debug the code there, you might find the reason.