diff --git a/.gitignore b/.gitignore index 67d37f32dd8..a178b6ddac8 100755 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ # Version file we automatically make /pkg/version/autogenerated.go + +# compiled binaries in third_party +/third_party/pkg diff --git a/cluster/kubecfg.sh b/cluster/kubecfg.sh index fb5efd6f87a..8e70e92f818 100755 --- a/cluster/kubecfg.sh +++ b/cluster/kubecfg.sh @@ -19,7 +19,7 @@ source $(dirname $0)/kube-env.sh source $(dirname $0)/$KUBERNETES_PROVIDER/util.sh -CLOUDCFG=$(dirname $0)/../output/go/kubecfg +CLOUDCFG=$(dirname $0)/../output/go/bin/kubecfg if [ ! -x $CLOUDCFG ]; then echo "Could not find kubecfg binary. Run hack/build-go.sh to build it." exit 1 diff --git a/hack/build-go.sh b/hack/build-go.sh index 00b5a40c263..1d545d10370 100755 --- a/hack/build-go.sh +++ b/hack/build-go.sh @@ -31,7 +31,4 @@ if [ $# -gt 0 ]; then BINARIES="$@" fi -for b in ${BINARIES}; do - echo "+++ Building ${b}" - go build "${KUBE_GO_PACKAGE}/${b}" -done +go install $(for b in $BINARIES; do echo "${KUBE_GO_PACKAGE}"/${b}; done) diff --git a/hack/config-go.sh b/hack/config-go.sh index e25421b374a..c96079f59f7 100755 --- a/hack/config-go.sh +++ b/hack/config-go.sh @@ -61,4 +61,7 @@ KUBE_GO_PACKAGE_DIR="${GOPATH}/src/${KUBE_GO_PACKAGE}" rm "${KUBE_GO_PACKAGE_DIR}" >/dev/null 2>&1 || true ln -s "${KUBE_REPO_ROOT}" "${KUBE_GO_PACKAGE_DIR}" ) + +# unset GOBIN in case it already exsit in the current session +unset GOBIN export GOPATH="${KUBE_TARGET}:${KUBE_REPO_ROOT}/third_party" diff --git a/hack/integration-test.sh b/hack/integration-test.sh index bfd6b71ce98..906a1614149 100755 --- a/hack/integration-test.sh +++ b/hack/integration-test.sh @@ -38,6 +38,6 @@ ETCD_PID=$! sleep 5 -$(dirname $0)/../output/go/integration +$(dirname $0)/../output/go/bin/integration kill $ETCD_PID diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index f7f4c28dcb5..a7e7464e5fb 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -49,7 +49,7 @@ set +e API_PORT=8080 KUBELET_PORT=10250 -GO_OUT=$(dirname $0)/../output/go +GO_OUT=$(dirname $0)/../output/go/bin APISERVER_LOG=/tmp/apiserver.log ${GO_OUT}/apiserver \