* Fix showing branch in non-master builds.
* Show error in last status, so it's visible later.
* `show' can get a `-s' flag too.
* Remove unused `append_dots'.
(cherry picked from commit d539792895
)
This commit is contained in:
parent
becd6bad7b
commit
e83af6c94b
|
@ -373,12 +373,12 @@ no_exit_on_error="no"
|
||||||
exit_error() {
|
exit_error() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "<<<BOOM>>> (Working on $machine($platform))" 1>&2
|
echo "<<<BOOM>>> (Working on $machine($platform))" 1>&2
|
||||||
echo "$@" 1>&2
|
echo "$*" 1>&2
|
||||||
if [[ "$no_exit_on_error" = "yes" ]]; then
|
if [[ "$no_exit_on_error" = "yes" ]]; then
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
echo "Aborting" 1>&2
|
echo "Aborting" 1>&2
|
||||||
write_status "Build error, aborted"
|
write_status "Build error, aborted: $*"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -477,17 +477,18 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
|
if [[ "x$1" = "x-s" ]]; then shift; write_status "$*"; fi
|
||||||
if [[ "$verbose" = "yes" ]]; then
|
if [[ "$verbose" = "yes" ]]; then
|
||||||
echo ""
|
echo ""
|
||||||
case "$platform" in
|
case "$platform" in
|
||||||
( *"-linux"* | "sparc-solaris" | *"-win32" )
|
( *"-linux"* | "sparc-solaris" | *"-win32" )
|
||||||
echo ">>>" "$@" | fmt -t -w 79
|
echo ">>> $*" | fmt -t -w 79
|
||||||
;;
|
;;
|
||||||
( *"-freebsd" | *"-osx-mac" | *"-darwin" )
|
( *"-freebsd" | *"-osx-mac" | *"-darwin" )
|
||||||
echo ">>>" "$@" | fmt -w 79
|
echo ">>> $*" | fmt -w 79
|
||||||
;;
|
;;
|
||||||
( * )
|
( * )
|
||||||
echo ">>>" "$@" | fmt
|
echo ">>> $*" | fmt
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -704,11 +705,6 @@ git_get() { # inputs: git repository, git branch, path in $maindir
|
||||||
_cd "$maindir"
|
_cd "$maindir"
|
||||||
}
|
}
|
||||||
|
|
||||||
append_dots() { # inputs: width, string
|
|
||||||
local line="............................................................"
|
|
||||||
echo "${2}${line:0:$(( ${1} - ${#2} ))}"
|
|
||||||
}
|
|
||||||
|
|
||||||
base_status=""
|
base_status=""
|
||||||
write_status() {
|
write_status() {
|
||||||
local message="$*"
|
local message="$*"
|
||||||
|
@ -720,10 +716,10 @@ write_status() {
|
||||||
touch "$statusfile"
|
touch "$statusfile"
|
||||||
chcon --type=httpd_sys_content_t "$statusfile"
|
chcon --type=httpd_sys_content_t "$statusfile"
|
||||||
fi
|
fi
|
||||||
echo "$*" > "$statusfile"
|
echo "$message" > "$statusfile"
|
||||||
else
|
else
|
||||||
# greppable lines for status, filtered out in final log (see below)
|
# greppable lines for status, filtered out in final log (see below)
|
||||||
echo "### <<< $* >>>"
|
echo "### <<< $message >>>"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1092,7 +1088,7 @@ MAIN_BUILD() {
|
||||||
|
|
||||||
# and now wait for all builds
|
# and now wait for all builds
|
||||||
if is_yes make_bins; then
|
if is_yes make_bins; then
|
||||||
show "Waiting for remote jobs to finish"
|
show -s "Waiting for remote jobs to finish"
|
||||||
wait
|
wait
|
||||||
for m in "${machines[@]}"; do
|
for m in "${machines[@]}"; do
|
||||||
machine="$m"
|
machine="$m"
|
||||||
|
|
|
@ -34,6 +34,7 @@ elif [[ "$S" = "Y" ]]; then
|
||||||
printf '\n%s build jobs running:\n' "$(ls "$bglogfile"* | wc -l)"
|
printf '\n%s build jobs running:\n' "$(ls "$bglogfile"* | wc -l)"
|
||||||
for bg in "$bglogfile"*; do
|
for bg in "$bglogfile"*; do
|
||||||
s="$(grep "^### <<< .* >>>" "$bg" | tail -1 \
|
s="$(grep "^### <<< .* >>>" "$bg" | tail -1 \
|
||||||
|
| sed -e 's/([^()]* build) //' \
|
||||||
| sed -e 's/^### <<< \(.*\) >>>/\1/')"
|
| sed -e 's/^### <<< \(.*\) >>>/\1/')"
|
||||||
if [[ "x$s" = "x" ]]; then
|
if [[ "x$s" = "x" ]]; then
|
||||||
printf ' %s: (just starting)\n' "${bg#$bglogfile-}"
|
printf ' %s: (just starting)\n' "${bg#$bglogfile-}"
|
||||||
|
@ -53,8 +54,14 @@ else
|
||||||
last="${last#Done (}"
|
last="${last#Done (}"
|
||||||
last="${last%)}"
|
last="${last%)}"
|
||||||
printf 'Last build successfully ended at %s\n' "$last"
|
printf 'Last build successfully ended at %s\n' "$last"
|
||||||
|
elif [[ "x$last" = "x("*" build) Done ("*")" ]]; then
|
||||||
|
last="${last#(}"
|
||||||
|
build="${last% build) Done*}"
|
||||||
|
last="${last#*) Done (}"
|
||||||
|
last="${last%)}"
|
||||||
|
printf 'Last %s build successfully ended at %s\n' "$build" "$last"
|
||||||
else
|
else
|
||||||
printf 'Last build was unsuccessful (while: %s)\n' "$last"
|
printf 'Last build was unsuccessful (%s)\n' "$last"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "$L" = "Y" ]]; then
|
if [[ "$L" = "Y" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user