Commit 7b28271a authored by Jon Brandvein's avatar Jon Brandvein Committed by Adam Cozzette

Migrate to new `ctx.actions` API (#5367)

* Migrate to new `ctx.actions` API

This allows building with --incompatible_new_actions_api.

* Fix typo
parent 29747f4c
...@@ -132,7 +132,7 @@ def _proto_gen_impl(ctx): ...@@ -132,7 +132,7 @@ def _proto_gen_impl(ctx):
inputs += [plugin] inputs += [plugin]
if not in_gen_dir: if not in_gen_dir:
ctx.action( ctx.actions.run(
inputs=inputs, inputs=inputs,
outputs=outs, outputs=outs,
arguments=args + import_flags + [src.path], arguments=args + import_flags + [src.path],
...@@ -154,7 +154,7 @@ def _proto_gen_impl(ctx): ...@@ -154,7 +154,7 @@ def _proto_gen_impl(ctx):
generated_out = '/'.join([gen_dir, out.basename]) generated_out = '/'.join([gen_dir, out.basename])
if generated_out != out.path: if generated_out != out.path:
command += ";mv %s %s" % (generated_out, out.path) command += ";mv %s %s" % (generated_out, out.path)
ctx.action( ctx.actions.run_shell(
inputs=inputs + [ctx.executable.protoc], inputs=inputs + [ctx.executable.protoc],
outputs=[out], outputs=[out],
command=command, command=command,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment