From 74939b6b173631246a3a62a2cb1f92175c53aa93 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Thu, 27 Jun 2019 22:52:48 -0700 Subject: [PATCH] supress libseccomp pkg-config errors --- hack/update-bazel.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/update-bazel.sh b/hack/update-bazel.sh index 5dcbc8c51cc..5e42bfa347d 100755 --- a/hack/update-bazel.sh +++ b/hack/update-bazel.sh @@ -62,11 +62,15 @@ for repo in "${staging_repos[@]}"; do done # Run gazelle to update Go rules in BUILD files. +# filter out known pkg-config error (see buildozer workaround below) +# NOTE: the `|| exit "${PIPESTATUS[0]}"` is to ignore grep errors +# while preserving the exit code of gazelle gazelle fix \ -external=vendored \ -mode=fix \ -repo_root "${KUBE_ROOT}" \ - "${KUBE_ROOT}" + "${KUBE_ROOT}" \ + 2>&1 | grep -Ev "vendor/github.com/seccomp/libseccomp-golang/seccomp(_internal)?.go: pkg-config not supported: #cgo pkg-config: libseccomp" || (exit "${PIPESTATUS[0]}") # Run kazel to update the pkg-srcs and all-srcs rules as well as handle # Kubernetes code generators.