feat: add --dry-run option for read-only infrastructure state check
This commit is contained in:
@@ -11,6 +11,7 @@ set -euo pipefail
|
|||||||
# ./run_all.sh --skip-setup # Skip setup scripts, start at preflight
|
# ./run_all.sh --skip-setup # Skip setup scripts, start at preflight
|
||||||
# ./run_all.sh --start-from=3 # Run preflight, then start at phase 3
|
# ./run_all.sh --start-from=3 # Run preflight, then start at phase 3
|
||||||
# ./run_all.sh --skip-setup --start-from=5
|
# ./run_all.sh --skip-setup --start-from=5
|
||||||
|
# ./run_all.sh --dry-run # Read-only infrastructure state check
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
@@ -31,6 +32,9 @@ START_FROM_SET=false
|
|||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
--skip-setup) SKIP_SETUP=true ;;
|
--skip-setup) SKIP_SETUP=true ;;
|
||||||
|
--dry-run)
|
||||||
|
exec "${SCRIPT_DIR}/post-migration-check.sh"
|
||||||
|
;;
|
||||||
--start-from=*)
|
--start-from=*)
|
||||||
START_FROM="${arg#*=}"
|
START_FROM="${arg#*=}"
|
||||||
START_FROM_SET=true
|
START_FROM_SET=true
|
||||||
@@ -50,12 +54,14 @@ Usage: $(basename "$0") [options]
|
|||||||
Options:
|
Options:
|
||||||
--skip-setup Skip configure_env + machine setup, start at preflight
|
--skip-setup Skip configure_env + machine setup, start at preflight
|
||||||
--start-from=N Skip phases before N (still runs preflight)
|
--start-from=N Skip phases before N (still runs preflight)
|
||||||
|
--dry-run Run read-only infrastructure check (no mutations)
|
||||||
--help Show this help
|
--help Show this help
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
$(basename "$0") Full run
|
$(basename "$0") Full run
|
||||||
$(basename "$0") --skip-setup Skip setup, start at preflight
|
$(basename "$0") --skip-setup Skip setup, start at preflight
|
||||||
$(basename "$0") --start-from=3 Run preflight, then phases 3-9
|
$(basename "$0") --start-from=3 Run preflight, then phases 3-9
|
||||||
|
$(basename "$0") --dry-run Check current state without changing anything
|
||||||
EOF
|
EOF
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
*) log_error "Unknown argument: $arg"; exit 1 ;;
|
*) log_error "Unknown argument: $arg"; exit 1 ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user