feat: add version checking and install manifest tracking
Add minimum version validation for all dependencies across local and remote machines (jq>=1.6, curl>=7.70, git>=2.30, docker>=20.0, compose>=2.0, shellcheck>=0.8, gh>=2.0). Setup scripts now record every install action to .manifests/<host>.manifest files, enabling full rollback via setup/cleanup.sh. teardown_all.sh gains --cleanup flag to chain prerequisite removal after phase teardowns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ source "${SCRIPT_DIR}/lib/common.sh"
|
||||
# ---------------------------------------------------------------------------
|
||||
THROUGH=1
|
||||
AUTO_YES=false
|
||||
RUN_CLEANUP=false
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
@@ -29,6 +30,7 @@ for arg in "$@"; do
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
--cleanup) RUN_CLEANUP=true ;;
|
||||
--yes|-y) AUTO_YES=true ;;
|
||||
--help|-h)
|
||||
cat <<EOF
|
||||
@@ -36,12 +38,14 @@ Usage: $(basename "$0") [options]
|
||||
|
||||
Options:
|
||||
--through=N Only tear down phases N through 9 (default: 1 = everything)
|
||||
--cleanup Also run setup/cleanup.sh to uninstall setup prerequisites
|
||||
--yes, -y Skip all confirmation prompts
|
||||
--help Show this help
|
||||
|
||||
Examples:
|
||||
$(basename "$0") Tear down everything
|
||||
$(basename "$0") --through=5 Tear down phases 5-9, leave 1-4
|
||||
$(basename "$0") --cleanup Full teardown + uninstall prerequisites
|
||||
$(basename "$0") --yes Non-interactive teardown
|
||||
EOF
|
||||
exit 0 ;;
|
||||
@@ -121,6 +125,24 @@ for entry in "${TEARDOWNS[@]}"; do
|
||||
printf '\n'
|
||||
done
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Optional: Run setup/cleanup.sh to uninstall prerequisites
|
||||
# ---------------------------------------------------------------------------
|
||||
if [[ "$RUN_CLEANUP" == "true" ]]; then
|
||||
log_info ">>> Running setup cleanup (uninstalling prerequisites)..."
|
||||
cleanup_args=()
|
||||
if [[ "$AUTO_YES" == "true" ]]; then
|
||||
cleanup_args+=(--yes)
|
||||
fi
|
||||
if "${SCRIPT_DIR}/setup/cleanup.sh" "${cleanup_args[@]}"; then
|
||||
PASS=$((PASS + 1))
|
||||
else
|
||||
log_warn "Setup cleanup had issues (continuing)"
|
||||
FAIL=$((FAIL + 1))
|
||||
fi
|
||||
printf '\n'
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Summary
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user