Crates.io | deterministic-zip |
lib.rs | deterministic-zip |
version | 0.0.4 |
source | src |
created_at | 2019-12-08 22:31:01.157683 |
updated_at | 2020-03-09 19:00:51.869473 |
description | A tool to generate consistent Zip files. |
homepage | |
repository | https://github.com/orf/deterministic-zip |
max_upload_size | |
id | 187394 |
size | 34,568 |
Regular zip utilities do not create deterministic zipfiles when given identical content. Things like the file modification times, directory iteration ordering and file permissions can change the hash of the zip file.
This is particularly annoying when using terraform with AWS Lambda. Without this tool every rebuild of the lambda source would result in a zip file with a different hash which would result in the lambda being re-deployed even if the source had not changed.
brew tap orf/brew
, then brew install deterministic-zip
cargo install deterministic-zip
Download a prebuilt binary from the releases page
The command is run like so: deterministic-zip [output-file] [files...]
For example: deterministic-zip output.zip my-source-code/
You can customize the compression with --compression
.
https://github.com/bboe/deterministic_zip and https://www.npmjs.com/package/deterministic-zip