Set gazelle:prefix on staging/src and remove sed hack

pull/8/head
Jeff Grafton 2018-05-15 17:50:55 -07:00
parent a725660640
commit f31183fa3d
2 changed files with 4 additions and 6 deletions

View File

@ -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

4
staging/src/BUILD Normal file
View File

@ -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