chore: preserve current bazel glob behavior as bazel 8 changes the default value of allow_empty from True to False

PiperOrigin-RevId: 738900918
This commit is contained in:
Google APIs 2025-03-20 12:33:45 -07:00 committed by Copybara-Service
parent ba85d2f145
commit d0a95bfd73

View file

@ -1,9 +1,11 @@
genrule(
name = "build_gen",
outs = ["build_gen.sh"],
executable = True,
srcs = glob(["run_build_gen.sh"]),
cmd = """
name = "build_gen",
srcs = glob(
["run_build_gen.sh"],
allow_empty = True,
),
outs = ["build_gen.sh"],
cmd = """
if test -z \"$(SRCS)\"; then
cat <<EOD > $@
#!/bin/sh
@ -15,4 +17,5 @@ EOD
cp $(SRCS) $@
fi
""",
executable = True,
)