mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
don't search bazel output paths for binaries
This commit is contained in:
parent
ed978f6549
commit
03576473ce
@ -314,7 +314,6 @@ function find-tar() {
|
|||||||
"${KUBE_ROOT}/node/${tarball}"
|
"${KUBE_ROOT}/node/${tarball}"
|
||||||
"${KUBE_ROOT}/server/${tarball}"
|
"${KUBE_ROOT}/server/${tarball}"
|
||||||
"${KUBE_ROOT}/_output/release-tars/${tarball}"
|
"${KUBE_ROOT}/_output/release-tars/${tarball}"
|
||||||
"${KUBE_ROOT}/bazel-bin/build/release-tars/${tarball}"
|
|
||||||
)
|
)
|
||||||
location=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )
|
location=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )
|
||||||
|
|
||||||
|
@ -219,16 +219,6 @@ kube::util::find-binary-for-platform() {
|
|||||||
);
|
);
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Also search for binary in bazel build tree if bazel-out/ exists.
|
|
||||||
if [[ -d "${KUBE_ROOT}/bazel-out" ]]; then
|
|
||||||
while IFS=$'\n' read -r bin_build_mode; do
|
|
||||||
if grep -q "${platform}" "${bin_build_mode}"; then
|
|
||||||
# drop the extension to get the real binary path.
|
|
||||||
locations+=("${bin_build_mode%.*}")
|
|
||||||
fi
|
|
||||||
done < <(find "${KUBE_ROOT}/bazel-out/" -name "${lookfor}.go_build_mode")
|
|
||||||
fi
|
|
||||||
|
|
||||||
# List most recently-updated location.
|
# List most recently-updated location.
|
||||||
local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )
|
local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user