When packaging files into zip archives as part of a CI/CD pipeline, naive zip commands produce different hashes on every run due to changing file timestamps — even when file contents are unchanged. This causes tools like rsync to re-upload all archives unnecessarily. The solution is to normalize file timestamps before zipping by setting each file's timestamp to its last git commit time using `git ls-tree` and `touch`. This ensures deterministic archive hashes across machines and builds, so only genuinely changed archives are uploaded.

4m read timeFrom embeddedartistry.com
Post cover image
Table of contents
The ProblemGoalsInvestigationThe SolutionReferences
26 Impressions