Add package readiness automation guard
This commit is contained in:
@@ -5,6 +5,14 @@ preset="${1:-linux-clang}"
|
||||
configuration="${2:-Debug}"
|
||||
target="${3:-PanoPainter}"
|
||||
artifact="${4:-out/build/$preset/$target}"
|
||||
readiness_only=0
|
||||
if [ "${1:-}" = "--readiness-only" ]; then
|
||||
readiness_only=1
|
||||
preset="${2:-linux-clang}"
|
||||
configuration="${3:-Debug}"
|
||||
target="${4:-PanoPainter}"
|
||||
artifact="${5:-out/build/$preset/$target}"
|
||||
fi
|
||||
start="$(date +%s)"
|
||||
root="$(pwd)"
|
||||
|
||||
@@ -84,6 +92,14 @@ package_readiness_json() {
|
||||
printf ']'
|
||||
}
|
||||
|
||||
if [ "$readiness_only" -eq 1 ]; then
|
||||
end="$(date +%s)"
|
||||
elapsed_ms="$(( (end - start) * 1000 ))"
|
||||
readiness="$(package_readiness_json)"
|
||||
printf '{"command":"package-smoke","preset":"%s","configuration":"%s","target":"%s","stage":"readiness","exitCode":0,"elapsedMs":%s,"packageReadiness":%s}\n' "$preset" "$configuration" "$target" "$elapsed_ms" "$readiness"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cmake --build --preset "$preset" --config "$configuration" --target "$target"
|
||||
build_exit="$?"
|
||||
if [ "$build_exit" -ne 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user