Documentation
¶
Overview ¶
Command archive packs a directory into a .tar.gz or a .zip that depends on nothing but its input and the Go that runs it: entries in byte order, owner 0:0, one modification time for every entry, no name or time in the gzip header. hack/release.sh uses it so that a release archive rebuilt anywhere -- macOS, Linux, BSD -- with the same Go is the same bytes. The system's tar and gzip are not: Apple's gzip and GNU's compress the same tar stream to different bytes.
go run ./hack/archive -mtime 1760203143 -o out.tar.gz -C parent dir
Click to show internal directories.
Click to hide internal directories.