starlark_syntax 0.13.0

Starlark language AST
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# @generated
def _generate_script_impl(ctx):
  script_file = ctx.actions.declare_file(ctx.label.name + ".bash")
  ctx.actions.write(output=script_file, is_executable=True, content="""
{0}
""".format(ctx.file.binary.short_path))
  return struct(
      files = depset([script_file]),
  )


generate_script = rule(
    _generate_script_impl,
    attrs = {
        "binary": attr.label(allow_files=True, single_file=True),
    },
)