mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #1191 from eparis/targets-in-config
Move targets and packages from build-go to config-go
This commit is contained in:
commit
60d4770127
@ -48,20 +48,10 @@ for arg; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [[ ${#targets[@]} -eq 0 ]]; then
|
if [[ ${#targets[@]} -eq 0 ]]; then
|
||||||
targets=(
|
targets=($(kube::default_build_targets))
|
||||||
cmd/proxy
|
|
||||||
cmd/apiserver
|
|
||||||
cmd/controller-manager
|
|
||||||
cmd/kubelet
|
|
||||||
cmd/kubecfg
|
|
||||||
plugin/cmd/scheduler
|
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
binaries=()
|
binaries=($(kube::binaries_from_targets "${targets[@]}"))
|
||||||
for target in ${targets[@]}; do
|
|
||||||
binaries+=("${KUBE_GO_PACKAGE}/${target}")
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Building local go components"
|
echo "Building local go components"
|
||||||
# Note that the flags to 'go build' are duplicated in the salt build setup
|
# Note that the flags to 'go build' are duplicated in the salt build setup
|
||||||
|
@ -114,6 +114,24 @@ kube::setup_go_environment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# kube::default_build_targets return list of all build targets
|
||||||
|
kube::default_build_targets() {
|
||||||
|
echo "cmd/proxy"
|
||||||
|
echo "cmd/apiserver"
|
||||||
|
echo "cmd/controller-manager"
|
||||||
|
echo "cmd/kubelet"
|
||||||
|
echo "cmd/kubecfg"
|
||||||
|
echo "plugin/cmd/scheduler"
|
||||||
|
}
|
||||||
|
|
||||||
|
# kube::binaries_from_targets take a list of build targets and return the
|
||||||
|
# full go package to be built
|
||||||
|
kube::binaries_from_targets() {
|
||||||
|
local target
|
||||||
|
for target; do
|
||||||
|
echo "${KUBE_GO_PACKAGE}/${target}"
|
||||||
|
done
|
||||||
|
}
|
||||||
# --- Environment Variables ---
|
# --- Environment Variables ---
|
||||||
|
|
||||||
# KUBE_REPO_ROOT - Path to the top of the build tree.
|
# KUBE_REPO_ROOT - Path to the top of the build tree.
|
||||||
|
Loading…
Reference in New Issue
Block a user