fix: minor yq docs updates and fixes
This commit is contained in:
parent
048c32ae8d
commit
cf7b195031
|
@ -26,11 +26,21 @@ load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
|
|||
|
||||
aspect_bazel_lib_dependencies()
|
||||
|
||||
# Optional: register the following toolchain to use jq
|
||||
\`\`\`
|
||||
|
||||
Optional toolchains:
|
||||
|
||||
\`\`\`starlark
|
||||
# Register the following toolchain to use jq
|
||||
|
||||
load("@aspect_bazel_lib//lib:repositories.bzl", "register_jq_toolchains")
|
||||
|
||||
register_jq_toolchains(version = "1.6")
|
||||
|
||||
# Register the following toolchain to use yq
|
||||
|
||||
load("@aspect_bazel_lib//lib:repositories.bzl", "register_yq_toolchains")
|
||||
|
||||
register_yq_toolchains(version = "4.24.5")
|
||||
\`\`\`
|
||||
EOF
|
||||
|
|
|
@ -19,7 +19,7 @@ To use this rule you must register the yq toolchain in your WORKSPACE:
|
|||
```starlark
|
||||
load("@aspect_bazel_lib//lib:repositories.bzl", "register_yq_toolchains")
|
||||
|
||||
register_yq_toolchains(version = "4.24.4")
|
||||
register_yq_toolchains(version = "4.24.5")
|
||||
```
|
||||
|
||||
Usage examples:
|
||||
|
@ -33,14 +33,14 @@ load("@aspect_bazel_lib//lib:yq.bzl", "yq")
|
|||
yq(
|
||||
name = "safe-config",
|
||||
srcs = ["config.yaml"],
|
||||
filter = "del(.credentials)",
|
||||
expression = "del(.credentials)",
|
||||
)
|
||||
```
|
||||
|
||||
```starlark
|
||||
# Merge two yaml documents
|
||||
yq(
|
||||
name = "merged",
|
||||
name = "ab",
|
||||
srcs = [
|
||||
"a.yaml",
|
||||
"b.yaml",
|
||||
|
@ -78,7 +78,7 @@ yq(
|
|||
```starlark
|
||||
# Convert a json file to yaml
|
||||
yq(
|
||||
name = "convert",
|
||||
name = "convert-to-yaml",
|
||||
srcs = ["bar.json"],
|
||||
args = ["-P"],
|
||||
outs = ["bar.yaml"],
|
||||
|
|
|
@ -18,7 +18,7 @@ def yq(name, srcs, expression = ".", args = [], outs = None, **kwargs):
|
|||
```starlark
|
||||
load("@aspect_bazel_lib//lib:repositories.bzl", "register_yq_toolchains")
|
||||
|
||||
register_yq_toolchains(version = "4.24.4")
|
||||
register_yq_toolchains(version = "4.24.5")
|
||||
```
|
||||
|
||||
Usage examples:
|
||||
|
@ -32,14 +32,14 @@ def yq(name, srcs, expression = ".", args = [], outs = None, **kwargs):
|
|||
yq(
|
||||
name = "safe-config",
|
||||
srcs = ["config.yaml"],
|
||||
filter = "del(.credentials)",
|
||||
expression = "del(.credentials)",
|
||||
)
|
||||
```
|
||||
|
||||
```starlark
|
||||
# Merge two yaml documents
|
||||
yq(
|
||||
name = "merged",
|
||||
name = "ab",
|
||||
srcs = [
|
||||
"a.yaml",
|
||||
"b.yaml",
|
||||
|
@ -77,7 +77,7 @@ def yq(name, srcs, expression = ".", args = [], outs = None, **kwargs):
|
|||
```starlark
|
||||
# Convert a json file to yaml
|
||||
yq(
|
||||
name = "convert",
|
||||
name = "convert-to-yaml",
|
||||
srcs = ["bar.json"],
|
||||
args = ["-P"],
|
||||
outs = ["bar.yaml"],
|
||||
|
|
Loading…
Reference in New Issue