bazel__book/p18_20/sandbox_demo/BUILD.bazel

14 lines
313 B
Python

load("//tools:echo_rule.bzl", "echo_rule")
# This target will fail because it tries to read a file without declaring it.
echo_rule(
name = "bad_read",
filename = "secret.txt",
)
genrule(
name = "good_read",
srcs = ["secret.txt"],
outs = ["good_read.txt"],
cmd = "cat $(location secret.txt) > $@",
)