From a8f8b9a36e9ffc19e79ae41bbbd16015ab38693a Mon Sep 17 00:00:00 2001 From: Brandon Stoll Date: Mon, 3 Jun 2024 21:00:19 +0000 Subject: [PATCH] Fix bazel query to use exact match --- .github/workflows/proto_breaking.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/proto_breaking.yml b/.github/workflows/proto_breaking.yml index 479a42b..8f9b3be 100644 --- a/.github/workflows/proto_breaking.yml +++ b/.github/workflows/proto_breaking.yml @@ -47,7 +47,7 @@ jobs: extract_protodesc() { local TMPTARGETDIR="${1}" - local TARGETS="$(bazel query 'attr("generator_function", "proto_library", "//...")' 2>/dev/null)" + local TARGETS="$(bazel query 'attr("generator_function", "^proto_library$", "//...")' 2>/dev/null)" local GENF="$(bazel info bazel-genfiles)" for TARGET in ${TARGETS}; do local TARGETDIR="$(echo "${TARGET}" | cut -d ":" -f1 | sed 's#^//##')" @@ -62,7 +62,7 @@ jobs: extract_protodesc "${TMPDIRHEAD}" git checkout "${BASE}" bazel clean - BASETARGETS="$(bazel query 'attr("generator_function", "proto_library", "//...")' 2>/dev/null)" + BASETARGETS="$(bazel query 'attr("generator_function", "^proto_library$", "//...")' 2>/dev/null)" extract_protodesc "${TMPDIRBASE}" ERROR=false