mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
function to turn list of targets to list of go packages
This commit is contained in:
parent
4ba97e3968
commit
e426dd78a1
@ -51,10 +51,7 @@ if [[ ${#targets[@]} -eq 0 ]]; then
|
|||||||
targets=($(kube::default_build_targets))
|
targets=($(kube::default_build_targets))
|
||||||
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
|
||||||
|
@ -123,6 +123,15 @@ kube::default_build_targets() {
|
|||||||
echo "cmd/kubecfg"
|
echo "cmd/kubecfg"
|
||||||
echo "plugin/cmd/scheduler"
|
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