From 78b82382cf9fa66a592a0f509913bfd19c8a172e Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Thu, 4 Sep 2014 11:01:44 -0400 Subject: [PATCH] default to build all binaries even if build options given --- hack/build-go.sh | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/hack/build-go.sh b/hack/build-go.sh index 121f95d4fc6..72560428d17 100755 --- a/hack/build-go.sh +++ b/hack/build-go.sh @@ -34,29 +34,35 @@ kube::setup_go_environment # Fetch the version. version_ldflags=$(kube::version_ldflags) -if [[ $# == 0 ]]; then - # Update $@ with the default list of targets to build. - set -- \ - cmd/proxy \ - cmd/apiserver \ - cmd/controller-manager \ - cmd/kubelet cmd/kubecfg \ - plugin/cmd/scheduler -fi - # Use eval to preserve embedded quoted strings. eval "goflags=(${GOFLAGS:-})" -binaries=() +targets=() for arg; do if [[ "${arg}" == -* ]]; then # Assume arguments starting with a dash are flags to pass to go. goflags+=("${arg}") else - binaries+=("${KUBE_GO_PACKAGE}/${arg}") + targets+=("${arg}") fi done +if [[ ${#targets[@]} -eq 0 ]]; then + targets=( + cmd/proxy + cmd/apiserver + cmd/controller-manager + cmd/kubelet + cmd/kubecfg + plugin/cmd/scheduler + ) +fi + +binaries=() +for target in ${targets[@]}; do + binaries+=("${KUBE_GO_PACKAGE}/${target}") +done + echo "Building local go components" # Note that the flags to 'go build' are duplicated in the salt build setup # (release/build-release.sh) for our cluster deploy. If we add more command