Skip to content

Commit

Permalink
Revert D48431626: Also scrub .jar, .aar and .apk outputs of a genrule
Browse files Browse the repository at this point in the history
Differential Revision:
D48431626

Original commit changeset: daf8d5d24982

Original Phabricator Diff: D48431626

fbshipit-source-id: 0ee92273a6a6b081fb10542ddfddc7940c606bde
  • Loading branch information
IanChilds authored and facebook-github-bot committed Aug 22, 2023
1 parent 11e6cd8 commit def7483
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions prelude/genrule.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ def _project_output(out: Artifact, path: str) -> Artifact:
else:
return out.project(path, hide_prefix = True)

def _is_zip_file(output: Artifact):
ext = output.extension
return ext == ".zip" or ext == ".apk" or ext == ".jar" or ext == ".aar"

def process_genrule(
ctx: AnalysisContext,
out_attr: [str, None],
Expand Down Expand Up @@ -248,7 +244,7 @@ def process_genrule(
genrule_toolchain = ctx.attrs._genrule_toolchain[GenruleToolchainInfo]
zip_scrubber = genrule_toolchain.zip_scrubber
if not is_windows and zip_scrubber != None:
zip_outputs = [output for output in default_outputs + flatten(named_outputs.values()) if _is_zip_file(output)]
zip_outputs = [output for output in default_outputs + flatten(named_outputs.values()) if output.extension == ".zip"]

if zip_outputs:
hidden.append(zip_scrubber)
Expand Down

0 comments on commit def7483

Please sign in to comment.