Indicate progress when doing a go build

It is slow.
pull/6/head
Eric Paris 2015-04-17 11:06:37 -04:00
parent 95183dde5a
commit d7fefb6f39
2 changed files with 10 additions and 0 deletions

View File

@ -295,6 +295,7 @@ kube::golang::build_binaries_for_platform() {
output_path="${output_path}/${platform//\//_}"
fi
kube::log::progress " "
for binary in "${binaries[@]}"; do
local bin=$(basename "${binary}")
if [[ ${GOOS} == "windows" ]]; then
@ -312,7 +313,9 @@ kube::golang::build_binaries_for_platform() {
-ldflags "${version_ldflags}" \
"${binary}"
fi
kube::log::progress "*"
done
kube::log::progress "\n"
else
# Use go install.
if [[ "${#nonstatics[@]}" != 0 ]]; then

View File

@ -119,6 +119,13 @@ kube::log::info() {
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() {
local messages=()
while read -r line; do