mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Indicate progress when doing a go build
It is slow.
This commit is contained in:
parent
95183dde5a
commit
d7fefb6f39
@ -295,6 +295,7 @@ kube::golang::build_binaries_for_platform() {
|
|||||||
output_path="${output_path}/${platform//\//_}"
|
output_path="${output_path}/${platform//\//_}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
kube::log::progress " "
|
||||||
for binary in "${binaries[@]}"; do
|
for binary in "${binaries[@]}"; do
|
||||||
local bin=$(basename "${binary}")
|
local bin=$(basename "${binary}")
|
||||||
if [[ ${GOOS} == "windows" ]]; then
|
if [[ ${GOOS} == "windows" ]]; then
|
||||||
@ -312,7 +313,9 @@ kube::golang::build_binaries_for_platform() {
|
|||||||
-ldflags "${version_ldflags}" \
|
-ldflags "${version_ldflags}" \
|
||||||
"${binary}"
|
"${binary}"
|
||||||
fi
|
fi
|
||||||
|
kube::log::progress "*"
|
||||||
done
|
done
|
||||||
|
kube::log::progress "\n"
|
||||||
else
|
else
|
||||||
# Use go install.
|
# Use go install.
|
||||||
if [[ "${#nonstatics[@]}" != 0 ]]; then
|
if [[ "${#nonstatics[@]}" != 0 ]]; then
|
||||||
|
@ -119,6 +119,13 @@ kube::log::info() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Just like kube::log::info, but no \n, so you can make a progress bar
|
||||||
|
kube::log::progress() {
|
||||||
|
for message; do
|
||||||
|
echo -e -n "$message"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
kube::log::info_from_stdin() {
|
kube::log::info_from_stdin() {
|
||||||
local messages=()
|
local messages=()
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
|
Loading…
Reference in New Issue
Block a user