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:
parent
067925e5a8
commit
e59bd34ab5
@ -48,18 +48,19 @@ cd "$SCRIPT_DIR"
|
|||||||
FORCE=false
|
FORCE=false
|
||||||
SKIP_HEALTH_CHECK=false
|
SKIP_HEALTH_CHECK=false
|
||||||
NO_CACHE=false
|
NO_CACHE=false
|
||||||
|
INTERACTIVE=true
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--force) FORCE=true; shift ;;
|
--force) FORCE=true; INTERACTIVE=false; shift ;;
|
||||||
--skip-health-check) SKIP_HEALTH_CHECK=true; shift ;;
|
--skip-health-check) SKIP_HEALTH_CHECK=true; INTERACTIVE=false; shift ;;
|
||||||
--no-cache) NO_CACHE=true; shift ;;
|
--no-cache) NO_CACHE=true; INTERACTIVE=false; shift ;;
|
||||||
*) fail "Unknown option: $1" ;;
|
*) fail "Unknown option: $1" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# ── Interactive Menu ────────────────────────────────────────────────────
|
# ── Interactive Menu ────────────────────────────────────────────────────
|
||||||
if [ $# -eq 0 ]; then
|
if [ "$INTERACTIVE" = true ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${CYAN}╔═══════════════════════════════════════════════════════════════╗${NC}"
|
echo -e "${CYAN}╔═══════════════════════════════════════════════════════════════╗${NC}"
|
||||||
echo -e "${CYAN}║${NC} ByteLyst Investment Trading - Deployment Options ${CYAN}║${NC}"
|
echo -e "${CYAN}║${NC} ByteLyst Investment Trading - Deployment Options ${CYAN}║${NC}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user