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