mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
Merge pull request #8765 from eparis/hack-test-failure
Fix build with --use_go_build (e2e.test failure)
This commit is contained in:
commit
a3d5367156
@ -329,20 +329,20 @@ kube::golang::build_binaries_for_platform() {
|
|||||||
|
|
||||||
if [[ -n ${use_go_build:-} ]]; then
|
if [[ -n ${use_go_build:-} ]]; then
|
||||||
kube::log::progress " "
|
kube::log::progress " "
|
||||||
for binary in "${binaries[@]}"; do
|
for binary in "${statics[@]:+${statics[@]}}"; do
|
||||||
local outfile=$(kube::golang::output_filename_for_binary "${binary}" \
|
local outfile=$(kube::golang::output_filename_for_binary "${binary}" "${platform}")
|
||||||
"${platform}")
|
|
||||||
if kube::golang::is_statically_linked_library "${binary}"; then
|
|
||||||
CGO_ENABLED=0 go build -o "${outfile}" \
|
CGO_ENABLED=0 go build -o "${outfile}" \
|
||||||
"${goflags[@]:+${goflags[@]}}" \
|
"${goflags[@]:+${goflags[@]}}" \
|
||||||
-ldflags "${version_ldflags}" \
|
-ldflags "${version_ldflags}" \
|
||||||
"${binary}"
|
"${binary}"
|
||||||
else
|
kube::log::progress "*"
|
||||||
|
done
|
||||||
|
for binary in "${nonstatics[@]:+${nonstatics[@]}}"; do
|
||||||
|
local outfile=$(kube::golang::output_filename_for_binary "${binary}" "${platform}")
|
||||||
go build -o "${outfile}" \
|
go build -o "${outfile}" \
|
||||||
"${goflags[@]:+${goflags[@]}}" \
|
"${goflags[@]:+${goflags[@]}}" \
|
||||||
-ldflags "${version_ldflags}" \
|
-ldflags "${version_ldflags}" \
|
||||||
"${binary}"
|
"${binary}"
|
||||||
fi
|
|
||||||
kube::log::progress "*"
|
kube::log::progress "*"
|
||||||
done
|
done
|
||||||
kube::log::progress "\n"
|
kube::log::progress "\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user