tschaub / grunt-newer

Configure Grunt tasks to run with newer files only.
https://npmjs.org/package/grunt-newer
MIT License
945 stars 61 forks source link

Fill timestamp file with timestamp for to allow versioning #69

Closed tschaub closed 9 years ago

tschaub commented 9 years ago

This adds content to the timestamp file, allowing it to be used in cases where people commit build artifacts to version control.

freewil commented 8 years ago

@tschaub doesn't this mtime check need to be changed to instead use the timestamp found in the file?

Also here

tschaub commented 8 years ago

@freewil are you running into a situation where things don't work as expected?

As I understand it, the original use case was just to have a file that git would recognize as changed (see https://github.com/tschaub/grunt-newer/pull/57#issuecomment-61367776).

I don't commit build artifacts to my source branches, so this is not a feature that I have used, and it is tough for me to gage how common the use cases are.

Your suggestions to check the contents of the file sound sensible to me, but I'd be curious to know what the workflow is that is currently not working.

freewil commented 8 years ago

I haven't run into a problem with this, although it seems sensible to use the time in the file if you're going to write one to it. I might be looking into this further in the next couple weeks, but currently am not concerned with this. Without thinking too deeply, seems mtime would be more brittle than using the written time. Not sure exactly on what events (copying, moving, etc.) mtime is modified, but the written timestamp seems more reliable.