ignore vendor in update-bazel.sh, ignore bazel in update-vendor.sh

This commit is contained in:
Benjamin Elder 2021-03-07 15:28:55 -08:00
parent 67b3235c7a
commit b1162745b2
2 changed files with 11 additions and 15 deletions

View File

@ -19,12 +19,17 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
# delete all bazel related files
find "${KUBE_ROOT}" \( \
-name BUILD \
-o -name BUILD.bazel \
-o -name '*.bzl' \
\) \
# delete all bazel related files not in vendor/
find "${KUBE_ROOT}" \
\( \
-name BUILD \
-o -name BUILD.bazel \
-o -name '*.bzl' \
\) \
-not \
\( \
-path "${KUBE_ROOT}"'/vendor*' \
\) \
-delete
# remove additional one-off bazel related files

View File

@ -378,15 +378,6 @@ for repo in $(kube::util::list_staging_repos); do
ln -s "../../staging/src/k8s.io/${repo}" "${KUBE_ROOT}/vendor/k8s.io/${repo}"
done
kube::log::status "vendor: updating BUILD files"
# Assume that anything imported through vendor doesn't need Bazel to build.
# Prune out any Bazel build files, since these can break the build due to
# missing dependencies that aren't included by go mod vendor.
find vendor/ -type f \
\( -name BUILD -o -name BUILD.bazel -o -name WORKSPACE \) \
-exec rm -f {} \;
hack/update-bazel.sh >>"${LOG_FILE}" 2>&1
kube::log::status "vendor: updating vendor/LICENSES"
hack/update-vendor-licenses.sh >>"${LOG_FILE}" 2>&1