Skip to content

Commit a3d5367

Browse files
committed
Merge pull request kubernetes#8765 from eparis/hack-test-failure
Fix build with --use_go_build (e2e.test failure)
2 parents f69eb0a + d8187e2 commit a3d5367

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

hack/lib/golang.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -329,20 +329,20 @@ kube::golang::build_binaries_for_platform() {
329329

330330
if [[ -n ${use_go_build:-} ]]; then
331331
kube::log::progress " "
332-
for binary in "${binaries[@]}"; do
333-
local outfile=$(kube::golang::output_filename_for_binary "${binary}" \
334-
"${platform}")
335-
if kube::golang::is_statically_linked_library "${binary}"; then
336-
CGO_ENABLED=0 go build -o "${outfile}" \
337-
"${goflags[@]:+${goflags[@]}}" \
338-
-ldflags "${version_ldflags}" \
339-
"${binary}"
340-
else
341-
go build -o "${outfile}" \
342-
"${goflags[@]:+${goflags[@]}}" \
343-
-ldflags "${version_ldflags}" \
344-
"${binary}"
345-
fi
332+
for binary in "${statics[@]:+${statics[@]}}"; do
333+
local outfile=$(kube::golang::output_filename_for_binary "${binary}" "${platform}")
334+
CGO_ENABLED=0 go build -o "${outfile}" \
335+
"${goflags[@]:+${goflags[@]}}" \
336+
-ldflags "${version_ldflags}" \
337+
"${binary}"
338+
kube::log::progress "*"
339+
done
340+
for binary in "${nonstatics[@]:+${nonstatics[@]}}"; do
341+
local outfile=$(kube::golang::output_filename_for_binary "${binary}" "${platform}")
342+
go build -o "${outfile}" \
343+
"${goflags[@]:+${goflags[@]}}" \
344+
-ldflags "${version_ldflags}" \
345+
"${binary}"
346346
kube::log::progress "*"
347347
done
348348
kube::log::progress "\n"

0 commit comments

Comments
 (0)