chore: document JQ_BIN make var
This commit is contained in:
parent
4231d45afc
commit
c6e9fa0e62
|
@ -110,6 +110,19 @@ jq(
|
|||
)
|
||||
```
|
||||
|
||||
You could also use it directly from a `genrule` by referencing the toolchain, and the `JQ_BIN`
|
||||
"Make variable" it exposes:
|
||||
|
||||
```
|
||||
genrule(
|
||||
name = "case_genrule",
|
||||
srcs = ["a.json"],
|
||||
outs = ["genrule_output.json"],
|
||||
cmd = "$(JQ_BIN) '.' $(location a.json) > $@",
|
||||
toolchains = ["@jq_toolchains//:resolved_toolchain"],
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
**PARAMETERS**
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ Returns the name of the host operating system
|
|||
|
||||
**RETURNS**
|
||||
|
||||
The string "windows", "linux" or "darwin" that describes the host os
|
||||
The string "windows", "linux", "freebsd" or "darwin" that describes the host os
|
||||
|
||||
|
||||
<a id="repo_utils.platform"></a>
|
||||
|
|
13
lib/jq.bzl
13
lib/jq.bzl
|
@ -109,6 +109,19 @@ def jq(name, srcs, filter = None, filter_file = None, args = [], out = None, **k
|
|||
)
|
||||
```
|
||||
|
||||
You could also use it directly from a `genrule` by referencing the toolchain, and the `JQ_BIN`
|
||||
"Make variable" it exposes:
|
||||
|
||||
```
|
||||
genrule(
|
||||
name = "case_genrule",
|
||||
srcs = ["a.json"],
|
||||
outs = ["genrule_output.json"],
|
||||
cmd = "$(JQ_BIN) '.' $(location a.json) > $@",
|
||||
toolchains = ["@jq_toolchains//:resolved_toolchain"],
|
||||
)
|
||||
```
|
||||
|
||||
Args:
|
||||
name: Name of the rule
|
||||
srcs: List of input files. May be empty.
|
||||
|
|
Loading…
Reference in New Issue