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

* Migrate to new `ctx.actions` API

This allows building with --incompatible_new_actions_api.

* Fix typo
pull/5373/head
Jon Brandvein 6 years ago committed by Adam Cozzette
parent 29747f4ca6
commit 7b28271a61
  1. 4
      protobuf.bzl

@ -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):
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,

Loading…
Cancel
Save