I am zipping a folder and fingerprinting it with its shasum however this keeps changing on every zipping. Same with md5 any idea why? Is it working based on access time or something? Is there a way to keep it consistent? It used to be consistent when I was doing git archive into a zip, but now I am directly zipping.
I am repeatedly zipping the same folder of files, but the shasum keeps changing
timestamps;zip;checksum
I had a similar problem with tar archives. There the differences were caused by atime and/or ctime entries. My solution was to usetar -c --format=ustar ...so that the timestamps were no longer part of the archive. Furthermore IIRC standard tar (i.e. GNU tar) creates a string describing the archive itself, and this string contains a timestamp. I.e. even if the archive content does not change at all the digest changes. This may be similar with ZIP.For ZIP it seems that you can use the option --no-extra / -X to avoid file timestamps to be written to the archive. I just tested that. Without this option I get different archives but with the option they are the same.