orchestra: pre-release WIP snapshot (orchestra-06g4m8whgq4p3gqmpeeh0rjrhm-70ced771)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
readonly VERSION=1.0.0
|
||||
readonly CHECKS=(script-runs)
|
||||
|
||||
# emit <format> <template> [args...]: the single output path.
|
||||
# format: text or json print; none suppresses (--quiet). Explicit argument,
|
||||
@@ -20,8 +21,14 @@ main() {
|
||||
emit text 'Healthcheck script for Orchestra E2E tests.\n'
|
||||
emit text 'Exits 0 with a success message if all checks pass.\n'
|
||||
emit text ' --quiet Suppress the success message; still exits 0.\n'
|
||||
emit text ' --list-checks Print the name of each check; exits 0.\n'
|
||||
emit text 'Version: %s\n' "$VERSION"
|
||||
exit 0
|
||||
elif [ "$arg" = --list-checks ]; then
|
||||
for name in "${CHECKS[@]}"; do
|
||||
emit text '%s\n' "$name"
|
||||
done
|
||||
exit 0
|
||||
elif [ "$arg" = --quiet ]; then
|
||||
quiet=1
|
||||
elif [ "$arg" = --json ]; then
|
||||
@@ -34,7 +41,7 @@ main() {
|
||||
[ -n "$json" ] && format=json
|
||||
|
||||
if [ "$format" = json ]; then
|
||||
emit "$format" '{"status":"ok","checks":1}\n'
|
||||
emit "$format" '{"status":"ok","checks":%d}\n' "${#CHECKS[@]}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user