diff options
author | 2015-10-13 12:51:50 +0000 | |
---|---|---|
committer | 2015-10-13 21:12:23 +0000 | |
commit | ea9870176a898dd9759d2ec2776cdb92ee0cf0f4 (patch) | |
tree | 6502780ef750b3fba701c960b06dfeea9c388b97 /tools | |
parent | e517abe4b1eeafd27daeac9e8c1f5b1d7f96aa6e (diff) |
[jsonnet] Update to Jsonnet 0.8.1
RELNOTES: [jsonnet] Update to Jsonnet 0.8.1.
--
MOS_MIGRATED_REVID=105303487
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_defs/jsonnet/jsonnet.WORKSPACE | 2 | ||||
-rw-r--r-- | tools/build_defs/jsonnet/jsonnet.bzl | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/tools/build_defs/jsonnet/jsonnet.WORKSPACE b/tools/build_defs/jsonnet/jsonnet.WORKSPACE index e6da943f34..963eeb4680 100644 --- a/tools/build_defs/jsonnet/jsonnet.WORKSPACE +++ b/tools/build_defs/jsonnet/jsonnet.WORKSPACE @@ -1,6 +1,6 @@ new_git_repository( name = "jsonnet", remote = "https://github.com/google/jsonnet.git", - tag = "v0.8.0", + tag = "v0.8.1", build_file = "tools/build_defs/jsonnet/jsonnet.BUILD", ) diff --git a/tools/build_defs/jsonnet/jsonnet.bzl b/tools/build_defs/jsonnet/jsonnet.bzl index 3a0e477178..91f371fe68 100644 --- a/tools/build_defs/jsonnet/jsonnet.bzl +++ b/tools/build_defs/jsonnet/jsonnet.bzl @@ -75,14 +75,7 @@ def _jsonnet_to_json_impl(ctx): output_json_files = [ctx.new_file(ctx.configuration.bin_dir, out.name) for out in ctx.attr.outs] outputs += output_json_files - command += ["-m", ctx.file.src.path] - # Currently, jsonnet -m creates the output files in the current working - # directory. Append mv commands to move the output files into their - # correct output directories. - # TODO(dzc): Remove this hack when jsonnet supports a flag for setting - # an output directory. - for json_file in output_json_files: - command += ["; mv %s %s" % (json_file.basename, json_file.path)] + command += ["-m", output_json_files[0].dirname, ctx.file.src.path] else: if len(ctx.attr.outs) > 1: fail("Only one file can be specified in outs if multiple_outputs is " + @@ -91,7 +84,7 @@ def _jsonnet_to_json_impl(ctx): compiled_json = ctx.new_file(ctx.configuration.bin_dir, ctx.attr.outs[0].name) outputs += [compiled_json] - command += [ctx.file.src.path, "> %s" % compiled_json.path] + command += [ctx.file.src.path, "-o", compiled_json.path] compile_inputs = ( [ctx.file.src, ctx.file._jsonnet, ctx.file._std] + |