mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Use 'go install' to build all commands at the same time.
'go build' compiles the packages but discards the results if multiple packages specified.
This commit is contained in:
parent
f91bfe2e00
commit
0375709fa3
3
.gitignore
vendored
3
.gitignore
vendored
@ -25,3 +25,6 @@
|
|||||||
|
|
||||||
# Version file we automatically make
|
# Version file we automatically make
|
||||||
/pkg/version/autogenerated.go
|
/pkg/version/autogenerated.go
|
||||||
|
|
||||||
|
# compiled binaries in third_party
|
||||||
|
/third_party/pkg
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
source $(dirname $0)/kube-env.sh
|
source $(dirname $0)/kube-env.sh
|
||||||
source $(dirname $0)/$KUBERNETES_PROVIDER/util.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
|
if [ ! -x $CLOUDCFG ]; then
|
||||||
echo "Could not find kubecfg binary. Run hack/build-go.sh to build it."
|
echo "Could not find kubecfg binary. Run hack/build-go.sh to build it."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -31,7 +31,4 @@ if [ $# -gt 0 ]; then
|
|||||||
BINARIES="$@"
|
BINARIES="$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for b in ${BINARIES}; do
|
go install $(for b in $BINARIES; do echo "${KUBE_GO_PACKAGE}"/${b}; done)
|
||||||
echo "+++ Building ${b}"
|
|
||||||
go build "${KUBE_GO_PACKAGE}/${b}"
|
|
||||||
done
|
|
||||||
|
@ -61,4 +61,7 @@ KUBE_GO_PACKAGE_DIR="${GOPATH}/src/${KUBE_GO_PACKAGE}"
|
|||||||
rm "${KUBE_GO_PACKAGE_DIR}" >/dev/null 2>&1 || true
|
rm "${KUBE_GO_PACKAGE_DIR}" >/dev/null 2>&1 || true
|
||||||
ln -s "${KUBE_REPO_ROOT}" "${KUBE_GO_PACKAGE_DIR}"
|
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"
|
export GOPATH="${KUBE_TARGET}:${KUBE_REPO_ROOT}/third_party"
|
||||||
|
@ -38,6 +38,6 @@ ETCD_PID=$!
|
|||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
$(dirname $0)/../output/go/integration
|
$(dirname $0)/../output/go/bin/integration
|
||||||
|
|
||||||
kill $ETCD_PID
|
kill $ETCD_PID
|
||||||
|
@ -49,7 +49,7 @@ set +e
|
|||||||
API_PORT=8080
|
API_PORT=8080
|
||||||
KUBELET_PORT=10250
|
KUBELET_PORT=10250
|
||||||
|
|
||||||
GO_OUT=$(dirname $0)/../output/go
|
GO_OUT=$(dirname $0)/../output/go/bin
|
||||||
|
|
||||||
APISERVER_LOG=/tmp/apiserver.log
|
APISERVER_LOG=/tmp/apiserver.log
|
||||||
${GO_OUT}/apiserver \
|
${GO_OUT}/apiserver \
|
||||||
|
Loading…
Reference in New Issue
Block a user