mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 06:37:28 +00:00
feat: add --no-test flag to prepare-gates
Allows skipping the full test suite during prepare phase. Testing is deferred to the dedicated Test phase in the pipeline.
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: scripts/pr-prepare <init|validate-commit|gates|push|run> <PR>"
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Usage: scripts/pr-prepare <init|validate-commit|gates|push|run> <PR> [--no-test]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
mode="$1"
|
||||
pr="$2"
|
||||
shift 2
|
||||
no_test=false
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--no-test) no_test=true ;;
|
||||
esac
|
||||
done
|
||||
script_dir="$(cd "$(dirname "$0")" && pwd)"
|
||||
base="$script_dir/pr"
|
||||
if common_git_dir=$(git -C "$script_dir" rev-parse --path-format=absolute --git-common-dir 2>/dev/null); then
|
||||
@@ -25,7 +32,11 @@ case "$mode" in
|
||||
exec "$base" prepare-validate-commit "$pr"
|
||||
;;
|
||||
gates)
|
||||
exec "$base" prepare-gates "$pr"
|
||||
if [ "$no_test" = "true" ]; then
|
||||
exec "$base" prepare-gates "$pr" true
|
||||
else
|
||||
exec "$base" prepare-gates "$pr"
|
||||
fi
|
||||
;;
|
||||
push)
|
||||
exec "$base" prepare-push "$pr"
|
||||
|
||||
Reference in New Issue
Block a user