Build statically linked binaryies. With the change to go 1.4, we probably were generating dynamically linked binaries accidentally.

This commit is contained in:
Abhishek Shah 2015-03-13 23:33:10 -07:00
parent 39b52e92a9
commit 4b24aa2d7f

View File

@ -296,13 +296,13 @@ kube::golang::build_binaries() {
if [[ ${GOOS} == "windows" ]]; then if [[ ${GOOS} == "windows" ]]; then
bin="${bin}.exe" bin="${bin}.exe"
fi fi
go build -o "${output_path}/${bin}" \ CGO_ENABLED=0 go build -installsuffix cgo -o "${output_path}/${bin}" \
"${goflags[@]:+${goflags[@]}}" \ "${goflags[@]:+${goflags[@]}}" \
-ldflags "${version_ldflags}" \ -ldflags "${version_ldflags}" \
"${binary}" "${binary}"
done done
else else
go install "${goflags[@]:+${goflags[@]}}" \ CGO_ENABLED=0 go install -installsuffix cgo "${goflags[@]:+${goflags[@]}}" \
-ldflags "${version_ldflags}" \ -ldflags "${version_ldflags}" \
"${binaries[@]}" "${binaries[@]}"
fi fi