Closed flode closed 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Awesome, thanks!
I wish the markdown change for the documentation was also part of this PR. I'm new to maintaining rules_pkg, my understanding is the docs are only generated later, if at all (#716). I'll try to convince @aiuto that we should change it.
I see there's some steps in docbuild/BUILD
on how to regenerate the docs, running that now has some different changes in addition to mine. Not sure if having the docs as part of each commit is worth it. But docs should definitely be generated for each release.
Zip offers different compression algorithms and levels. For packaging, sometimes faster compression speed is more important than size. With
pkg_tar
, there is already the option to use a custom compressor, there's no similar option forpkg_zip
yet.This PR exposes the zip
compression_level
andcompression_type
arguments forpkg_zip
, thus enabling the use case.The list of compressions is the same as Python's
ZipFile
: https://docs.python.org/3/library/zipfile.html#zipfile.ZIP_STOREDThere's a new test case that verifies that the compression settings work by comparing the compressed file sizes.
The default compression level is the same as in this recent change for
pkg_tar
in #720