mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Dedup binaries when building
This commit is contained in:
parent
9256031a87
commit
0af3106442
@ -964,6 +964,7 @@ kube::golang::build_binaries() {
|
||||
if [[ ${#targets[@]} -eq 0 ]]; then
|
||||
targets=("${KUBE_ALL_TARGETS[@]}")
|
||||
fi
|
||||
kube::util::read-array targets < <(kube::golang::dedup "${targets[@]}")
|
||||
|
||||
local -a platforms
|
||||
IFS=" " read -ra platforms <<< "${KUBE_BUILD_PLATFORMS:-}"
|
||||
@ -972,7 +973,7 @@ kube::golang::build_binaries() {
|
||||
fi
|
||||
|
||||
local -a binaries
|
||||
while IFS="" read -r binary; do binaries+=("$binary"); done < <(kube::golang::binaries_from_targets "${targets[@]}")
|
||||
kube::util::read-array binaries < <(kube::golang::binaries_from_targets "${targets[@]}")
|
||||
|
||||
local parallel=false
|
||||
if [[ ${#platforms[@]} -gt 1 ]]; then
|
||||
|
@ -832,8 +832,8 @@ function kube::util::md5() {
|
||||
# kube::util::read-array
|
||||
# Reads in stdin and adds it line by line to the array provided. This can be
|
||||
# used instead of "mapfile -t", and is bash 3 compatible. If the named array
|
||||
# exists and is an array, it will be used. Otherwise it will be unset and
|
||||
# recreated.
|
||||
# exists and is an array, it will be overwritten. Otherwise it will be unset
|
||||
# and recreated.
|
||||
#
|
||||
# Assumed vars:
|
||||
# $1 (name of array to create/modify)
|
||||
|
Loading…
Reference in New Issue
Block a user