(Not a debug question, but to provide background as to why I think there’s a use case for this feature). So I have a django project with a ci/cd pipeline. The pipeline runs
collecstatic at some point, however the files aren’t necessarily copied, and it appears this is because for some reason at some point the timestamps in /static and my source folders get set to the same thing somewhere in that pipeline. And as you all likely know,
collectstatic compares timestamps to decide if it wants to copy stuff over or not.
I was thinking an option like
--compare_filesize would be useful.
- In that case,
collecstaticwould copy a file if it doesn’t exist in /static (as per current), or if a file with the same name has a different filesize.
- It wouldn’t impact existing code, since it’s just a new flag option
- Likely wouldn’t be too hard to implement either, basically adding a flag to the
collectstaticcall and the new code to compare filesizes.
What do you think? Is that a relevent idea in the first place, and if so, is that a decent target for a new contributor to the codebas such as myself? I’m an advanced programmer in python, comfortable working with the more obscure/advanced features of the language if needed, though I haven’t been working on super large codebases such as django’s.