fix(deployment): fix command-line argument parsing

- Add INTERACTIVE flag to properly detect when command-line args are used
- Fix deployment script to skip menu when flags are provided
- Allow non-interactive deployment with --force, --skip-health-check, --no-cache

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
root 2026-05-12 17:43:25 +00:00
parent 067925e5a8
commit e59bd34ab5

View File

@ -48,18 +48,19 @@ cd "$SCRIPT_DIR"
FORCE=false
SKIP_HEALTH_CHECK=false
NO_CACHE=false
INTERACTIVE=true
while [[ $# -gt 0 ]]; do
case "$1" in
--force) FORCE=true; shift ;;
--skip-health-check) SKIP_HEALTH_CHECK=true; shift ;;
--no-cache) NO_CACHE=true; shift ;;
--force) FORCE=true; INTERACTIVE=false; shift ;;
--skip-health-check) SKIP_HEALTH_CHECK=true; INTERACTIVE=false; shift ;;
--no-cache) NO_CACHE=true; INTERACTIVE=false; shift ;;
*) fail "Unknown option: $1" ;;
esac
done
# ── Interactive Menu ────────────────────────────────────────────────────
if [ $# -eq 0 ]; then
if [ "$INTERACTIVE" = true ]; then
echo ""
echo -e "${CYAN}╔═══════════════════════════════════════════════════════════════╗${NC}"
echo -e "${CYAN}${NC} ByteLyst Investment Trading - Deployment Options ${CYAN}${NC}"