From f31183fa3dad7f0b6544724fb74555c26472c78a Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Tue, 15 May 2018 17:50:55 -0700 Subject: [PATCH] Set gazelle:prefix on staging/src and remove sed hack --- hack/update-bazel.sh | 6 ------ staging/src/BUILD | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 staging/src/BUILD diff --git a/hack/update-bazel.sh b/hack/update-bazel.sh index 14d57eff4be..98def35f9f5 100755 --- a/hack/update-bazel.sh +++ b/hack/update-bazel.sh @@ -41,11 +41,5 @@ gazelle fix \ -build_file_name=BUILD,BUILD.bazel \ -external=vendored \ -mode=fix -# gazelle gets confused by our staging/ directory, prepending an extra -# "k8s.io/kubernetes/staging/src" to the import path. -# gazelle won't follow the symlinks in vendor/, so we can't just exclude -# staging/. Instead we just fix the bad paths with sed. -find staging -name BUILD -o -name BUILD.bazel | \ - xargs ${SED} -i 's|\(importpath = "\)k8s.io/kubernetes/staging/src/\(.*\)|\1\2|' kazel diff --git a/staging/src/BUILD b/staging/src/BUILD new file mode 100644 index 00000000000..713eaec423e --- /dev/null +++ b/staging/src/BUILD @@ -0,0 +1,4 @@ +# gazelle gets confused by our staging/ directory, prepending an extra +# "k8s.io/kubernetes/staging/src" to the importpath. +# Using this directive ensures that it sets the correct importpath. +# gazelle:prefix