mirror of
https://github.com/google/nomulus
synced 2026-01-07 22:15:30 +00:00
Fix .bzl files with buildifier
This CL fixes .bzl files to make them compatible with the next versions of Bazel. This is done by running the following command on all the .bzl files:
buildifier --lint=fix --warnings=attr-non-empty,attr-single-file,ctx-actions,output-group
More information: []
Tested:
tap_presubmit
Some tests failed; test failures are believed to be unrelated to this CL
BEGIN_PUBLIC
Internal cleanup
END_PUBLIC
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=235192309
This commit is contained in:
@@ -178,11 +178,11 @@ def _zip_file(ctx):
|
||||
else:
|
||||
# TODO(kchodorow): remove this once Bazel 4.0+ is required.
|
||||
script = ctx.new_file(ctx.configuration.bin_dir, "%s.sh" % ctx.label.name)
|
||||
ctx.file_action(output = script, content = "\n".join(cmd), executable = True)
|
||||
ctx.actions.write(output = script, content = "\n".join(cmd), is_executable = True)
|
||||
inputs = [ctx.file._zipper]
|
||||
inputs += [dep.zip_file for dep in ctx.attr.deps]
|
||||
inputs += srcs.to_list()
|
||||
ctx.action(
|
||||
ctx.actions.run(
|
||||
inputs = inputs,
|
||||
outputs = [ctx.outputs.out],
|
||||
executable = script,
|
||||
@@ -251,6 +251,6 @@ zip_file = rule(
|
||||
"deps": attr.label_list(providers = ["zip_file"]),
|
||||
"exclude": attr.string_list(),
|
||||
"mappings": attr.string_dict(),
|
||||
"_zipper": attr.label(default = Label(ZIPPER), single_file = True),
|
||||
"_zipper": attr.label(default = Label(ZIPPER), allow_single_file = True),
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user