-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zip Java tools for windows #7708
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly shell style nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I forgot to send my comments yesterday. :(
third_party/zip_files.sh
Outdated
tmp_dir=$(mktemp -d -t 'tmpdirXXXXX') | ||
tmp_zip="$tmp_dir/archive.zip" | ||
|
||
zip -j -q "$tmp_zip" "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sort input files for determinism; consider using -D
third_party/zip_files.sh
Outdated
|
||
mkdir -p "$tmp_dir/$directory_structure" | ||
cd "$tmp_dir/$directory_structure" | ||
unzip -q "$tmp_zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why unzip and zip again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unzipping everything under the given directory_prefix
so that when zipping directory_prefix
the zip content has the same directory structure. I couldn't find a way to get the same results only by using zip. If you have any experience with this I'm happy to replace this part of the script.
@lberki all comments addressed, ready for re-review |
Create a zip archive for the remote Java tools for Windows instead of a tar, which can not be parsed on some other platforms. Bazel doesn't have the equivalent of a `pkg_zip` rule and this PR introduces two new scripts that use `zip` directly: `third_party/merge_zip_files.sh`: merges all the given `zip` files into a single `zip` `third_party/zip_files.sh`: archives all the inputs files under the given directory structure in the output `zip` file Partial merge of #7708. PiperOrigin-RevId: 238969545
Partial commit of third_party/*. See #7708. Signed-off-by: iirina <[email protected]>
All changes merged. |
Create a zip archive for the remote Java tools for Windows instead of a tar, which can not be parsed on some other platforms.
Bazel doesn't have the equivalent of a
pkg_zip
rule and this PR introduces two new scripts that usezip
directly:third_party/merge_zip_files.sh
: merges all the givenzip
files into a singlezip
third_party/zip_files.sh
: archives all the inputs files under the given directory structure in the outputzip
file