Skip to content

Commit d5705a6

Browse files
committed
Generate a dummy BUILD file in _output/local/go to keep Bazel out of trouble
1 parent 7841d57 commit d5705a6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.gazelcfg.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@
99
"./federation",
1010
"./examples"
1111
],
12+
"SkippedPaths": [
13+
"^_.*"
14+
],
1215
"AddSourcesRules": true
1316
}

hack/lib/golang.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ kube::golang::create_gopath_tree() {
307307
if [[ ! -e "${go_pkg_dir}" || "$(readlink ${go_pkg_dir})" != "${KUBE_ROOT}" ]]; then
308308
ln -snf "${KUBE_ROOT}" "${go_pkg_dir}"
309309
fi
310+
311+
cat >"${KUBE_GOPATH}/BUILD" <<EOF
312+
# This dummy BUILD file prevents Bazel from trying to descend through the
313+
# infinite loop created by the symlink at
314+
# ${go_pkg_dir}
315+
EOF
310316
}
311317

312318
# Ensure the godep tool exists and is a viable version.

0 commit comments

Comments
 (0)