expand_template
A rule that performs template expansion.
Rules
expand_template
Template expansion
This performs a simple search over the template file for the keys in substitutions, and replaces them with the corresponding values.
There is no special syntax for the keys. To avoid conflicts, you would need to explicitly add delimiters to the key strings, for example "{KEY}" or "@KEY@".
Example usage (generated):
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
expand_template(
# A unique name for this target.
name = "",
# The destination of the expanded file.
out = "",
# A dictionary mapping strings to their substitutions.
substitutions = {},
# The template file to expand.
template = "",
)
name
Required name.
A unique name for this target.
out
Required label.
The destination of the expanded file.
substitutions
Required dictionary: String → String.
A dictionary mapping strings to their substitutions.
template
Required label.
The template file to expand.