Add documentation for a new script that automates database backups, version incrementing, and Gitlab pushes, including a .env file for credentials and commands for patch, minor, and major version updates. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/Z1LDqzu
1.8 KiB
1.8 KiB
⚡ Quick Start - GitLab Deployment
Guida rapida per iniziare subito con il deployment su GitLab.
🚀 Setup in 3 Passi
1️⃣ Ottieni Token GitLab
# Vai su GitLab → Settings → Access Tokens
# https://gitlab.com/-/profile/personal_access_tokens
#
# Crea token con permessi: api, read_repository, write_repository
2️⃣ Configura git.env
# Modifica git.env con le tue credenziali
nano git.env
GITLAB_USER=tuo-username
GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxx
GITLAB_REPO=https://gitlab.com/tuo-username/vigilanzaturni.git
GITLAB_BRANCH=main
3️⃣ Deploy!
# Rendi eseguibile (solo prima volta)
chmod +x push-gitlab.sh
# Deploy!
./push-gitlab.sh
📝 Comandi Principali
# Bug fix, piccole modifiche (1.0.0 → 1.0.1)
./push-gitlab.sh
# Nuove funzionalità (1.0.5 → 1.1.0)
./push-gitlab.sh minor
# Breaking changes (1.1.5 → 2.0.0)
./push-gitlab.sh major
✅ Cosa Succede
- ✅ Backup Database automatico (compressi .gz)
- ✅ Incrementa Versione semantica
- ✅ Commit e Push su GitLab
- ✅ Crea Tag versione (es. v1.0.1)
- ✅ Aggiorna version.json
📊 Versioning Cheat Sheet
| Tipo | Comando | Esempio | Quando |
|---|---|---|---|
| Patch | ./push-gitlab.sh |
1.0.0 → 1.0.1 | Bug fix |
| Minor | ./push-gitlab.sh minor |
1.0.5 → 1.1.0 | Nuove feature |
| Major | ./push-gitlab.sh major |
1.5.2 → 2.0.0 | Breaking changes |
🔍 Verifica Stato
# Versione corrente
cat version.json
# Ultimi backup
ls -lh database-backups/
# Configurazione
cat git.env
📖 Documentazione Completa
Per dettagli completi vedi: GITLAB-DEPLOY.md
Setup time: ~2 minuti 🎉