From 68ea4b0075d8430fbc981e23e9f590392ad39833 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Tue, 20 Dec 2016 11:30:46 -0500 Subject: [PATCH] Don't include directory entries in GWT UI zip files Currently, the GWT UI zip files contain some empty bazel directories: $ unzip -l bazel-genfiles/gerrit-gwtui/ui_optdbg.zip | grep bazel Archive: bazel-genfiles/gerrit-gwtui/ui_optdbg.zip 0 2016-12-20 09:57 bazel-out/ 0 2016-12-20 09:57 bazel-out/local-fastbuild/ 0 2016-12-20 09:57 bazel-out/local-fastbuild/genfiles/ 0 2016-12-20 09:57 bazel-out/local-fastbuild/genfiles/gerrit-gwtui/ These end up making it into the WAR files, which is unfortunate. The easiest way to eliminate these is to just omit all directories from this one intermediate zip file. As there are several other intermediate zip files, we actually still end up with directory entries in the output WAR, just not these garbage ones. Change-Id: I32bb39acc4d32207f9e006486cbba47fc06e0be0 --- tools/bzl/gwt.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bzl/gwt.bzl b/tools/bzl/gwt.bzl index 67a45cc5f7..4dcb9ffab9 100644 --- a/tools/bzl/gwt.bzl +++ b/tools/bzl/gwt.bzl @@ -250,7 +250,7 @@ def gwt_genrule(suffix = ""): ' gerrit_ui/dbg_gerrit_ui.nocache.js;' + 'unzip -qo $$ROOT/$(location :%s);' % opt + 'mkdir -p $$(dirname $@);' + - 'zip -qr $$ROOT/$@ .', + 'zip -qrD $$ROOT/$@ .', outs = ['ui_optdbg' + suffix + '.zip'], visibility = ['//visibility:public'], )