#!/usr/bin/env bash set -euo pipefail RED='\033[0;31m' GREEN='\033[0;32m' CYAN='\033[0;36m' NC='\033[0m' log_info() { echo -e "${CYAN}[INFO]${NC} $1"; } log_success() { echo -e "${GREEN}[SUCCESS]${NC} $1"; } log_error() { echo -e "${RED}[ERROR]${NC} $1"; } GITLAB_URL="https://gitlab.com/a6-nuna-9v/V9.git" GITLAB_TOKEN="${GITLAB_ACCESS_TOKEN:-}" if [[ -z "$GITLAB_TOKEN" ]]; then log_error "GITLAB_ACCESS_TOKEN is not set." exit 1 fi REMOTE_URL="https://oauth2:${GITLAB_TOKEN}@gitlab.com/a6-nuna-9v/V9.git" log_info "Adding GitLab remote..." git remote remove gitlab 2>/dev/null || true git remote add gitlab "$REMOTE_URL" log_info "Pushing to GitLab..." git push gitlab HEAD:main --force log_success "Successfully synced to GitLab!"