2026-09-03 09:34:51 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# Wrapper for the Babashka APS gherkin-parser task.
|
2026-09-15 17:47:33 -07:00
|
|
|
# Delegates to the single canonical APS checkout under <repo-root>/tmp/aps.
|
2026-09-03 09:34:51 -07:00
|
|
|
set -euo pipefail
|
|
|
|
|
if [ "$#" -ne 2 ]; then
|
|
|
|
|
echo "usage: gherkin-parser <feature-file> <json-output>" >&2
|
|
|
|
|
exit 2
|
|
|
|
|
fi
|
|
|
|
|
FEATURE_FILE="$(realpath -m "$1")"
|
|
|
|
|
JSON_OUTPUT="$(realpath -m "$2")"
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
2026-09-15 17:47:33 -07:00
|
|
|
APS_DIR="$("$SCRIPT_DIR/ensure-aps.sh")"
|
2026-09-03 09:34:51 -07:00
|
|
|
cd "$APS_DIR"
|
|
|
|
|
exec bb gherkin-parser "$FEATURE_FILE" "$JSON_OUTPUT"
|