From b5e5ad7e427cd774fb40ec63d9e63e198336f0ee Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Thu, 16 Apr 2026 11:50:20 +0100 Subject: [PATCH] fix: deploy.sh pull_code now works with monorepo structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was checking backend/.git and frontend/.git (submodule pattern) which never exists — git pull silently skipped, deploying stale code. Now pulls root repo first, falls back to submodule pattern. Co-Authored-By: Claude Sonnet 4.6 --- scripts/deploy.sh | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 282674b..ff2fb8a 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -105,26 +105,25 @@ preflight_checks() { pull_code() { print_header "Pulling Latest Code" - # Pull backend - if [ -d "backend/.git" ]; then + if [ -d ".git" ]; then + print_info "Pulling monorepo..." + git pull origin main + print_success "Code updated" + elif [ -d "backend/.git" ]; then print_info "Pulling backend repository..." - cd backend - git pull - cd .. + cd backend && git pull && cd .. print_success "Backend code updated" - else - print_warning "Backend is not a git repository, skipping pull" - fi - # Pull frontend - if [ -d "frontend/.git" ]; then - print_info "Pulling frontend repository..." - cd frontend - git pull - cd .. - print_success "Frontend code updated" + if [ -d "frontend/.git" ]; then + print_info "Pulling frontend repository..." + cd frontend && git pull && cd .. + print_success "Frontend code updated" + else + print_warning "Frontend is not a git repository, skipping pull" + fi else - print_warning "Frontend is not a git repository, skipping pull" + print_error "No git repository found. Cannot pull latest code." + exit 1 fi echo ""