Support building/packaging Windows client binaries.

Ug -- .exe suffix is a pain.  These are largely untested.
This commit is contained in:
Joe Beda
2014-11-24 14:10:28 -08:00
parent e82b88fed8
commit 5bf43236e3
2 changed files with 25 additions and 7 deletions

View File

@@ -40,6 +40,7 @@ readonly KUBE_CLIENT_TARGETS=(
cmd/kubernetes
)
readonly KUBE_CLIENT_BINARIES=("${KUBE_CLIENT_TARGETS[@]##*/}")
readonly KUBE_CLIENT_BINARIES_WIN=("${KUBE_CLIENT_BINARIES[@]/%/.exe}")
# The set of test targets that we are building for all platforms
readonly KUBE_TEST_TARGETS=(
@@ -56,6 +57,7 @@ readonly KUBE_CLIENT_PLATFORMS=(
linux/arm
darwin/amd64
darwin/386
windows/amd64
)
readonly KUBE_ALL_TARGETS=(
@@ -280,6 +282,9 @@ kube::golang::build_binaries() {
for binary in "${binaries[@]}"; do
local bin=$(basename "${binary}")
if [[ ${GOOS} == "windows" ]]; then
bin="${bin}.exe"
fi
go build -o "${output_path}/${bin}" \
"${goflags[@]:+${goflags[@]}}" \
-ldflags "${version_ldflags}" \