Also assume arguments starting with dashes are go flags in hack/build-go.sh

Tested:
  $ hack/build-go.sh cmd/kubelet -v
  github.com/GoogleCloudPlatform/kubernetes/pkg/...

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This commit is contained in:
Filipe Brandenburger 2014-09-03 14:58:45 -07:00
parent 8effbdc63f
commit 3d03b4b80f

View File

@ -44,14 +44,19 @@ if [[ $# == 0 ]]; then
plugin/cmd/scheduler
fi
binaries=()
for arg; do
binaries+=("${KUBE_GO_PACKAGE}/${arg}")
done
# Use eval to preserve embedded quoted strings.
eval "goflags=(${GOFLAGS:-})"
binaries=()
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}")
fi
done
# 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
# line options to our standard build we'll want to duplicate them there. As we