mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
Fix Maven build output (#20491)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -58,10 +58,10 @@ function mvnp() {
|
||||
local padding=$(bc -l <<< "scale=0;2*(l($reactor_size)/l(10)+1)")
|
||||
local command=(bash ./mvnw "$@")
|
||||
|
||||
"${command[@]}" 2>&1 | \ # execute, redirect stderr to stdout
|
||||
tee "$BUILD_LOG" | \ # write output to log
|
||||
stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | \ # filter progress
|
||||
stdbuf -o0 sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | \ # prefix project name with progress
|
||||
"${command[@]}" 2>&1 | # execute, redirect stderr to stdout
|
||||
tee "$BUILD_LOG" | # write output to log
|
||||
stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | # filter progress
|
||||
stdbuf -o0 sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | # prefix project name with progress
|
||||
stdbuf -o0 sed -e :a -e "s/^.\{1,${padding}\}|/ &/;ta" # right align progress with padding
|
||||
|
||||
# Exit code of Maven is the first command in the pipeline
|
||||
|
||||
Reference in New Issue
Block a user